> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trypopcorn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting AI agents

> Fix an agent that does not reply, gives wrong answers, hands over too often or never, replies slowly, or ignores changes you made.

Most agent problems come down to one of three things: the conversation is no longer assigned to the AI, the change you made has not been published, or the agent was never given the knowledge, tool or channel it needs. Start with the symptom below.

## The agent does not reply

| Likely cause | What to do |
| - | - |
| The conversation is not assigned to the AI. After a handover, or after a teammate takes over, the AI stays silent in that conversation. It shows in the **Needs you** folder. | Reply as a teammate, or assign the conversation back to the AI from the Inbox. See [Working conversations](https://docs.trypopcorn.ai/inbox/working-conversations.md). |
| The workspace has no credits. The agent's status reads **Stopped, out of credits**. Popcorn does not generate a reply; it hands the conversation over to your team, a team member gets an in-app notification titled **Conversation Handover - Credits Exhausted**, and the agent's Slack and email handover alerts are sent if enabled. | Top up under **Plan and billing**. See [Plans and credits](https://docs.trypopcorn.ai/billing/plans-and-credits.md). |
| The agent's status reads **Stopped, plan ended**: your plan through Zid has ended. The agent does not reply whatever credits remain, and conversations are handed over to your team. | Renew the plan. See [When a Zid plan ends](https://docs.trypopcorn.ai/billing/plans-and-credits.md#when-a-zid-plan-ends). |
| No agent can answer the number: it is attached to no agent and the workspace has no default agent. Popcorn hands the conversation over. | Switch the number on for an agent under its **Channels** tab, or choose a default agent from the **Agents** page with **Set as default**. |
| The reply could not be generated (for example a tool call failed). Popcorn hands the conversation over rather than leaving the customer waiting. | Open the conversation in **Needs you**, reply, and check the tool that failed. |
| The agent's status reads **Not published yet** or **Not on WhatsApp yet**. | A new agent answers customers only once it is published and has a WhatsApp number switched on. See [Create an agent](https://docs.trypopcorn.ai/agents/create-an-agent.md). |
| In the test chat the reply did not arrive. | You see **The reply didn't come through. Send your message again.** Send the message again. |

## Replies contain wrong or outdated information

* **The change is not published.** Customers, the test chat and the sandbox all use the published version. Open the agent: if a banner says it has unpublished changes, click **Save and review** and then **Publish changes**. See [Test and publish](https://docs.trypopcorn.ai/agents/test-and-publish.md).

* **The agent cannot read the right knowledge base.** On the agent's **Knowledge** tab, switch on the knowledge base that holds the article, then publish. Only published articles are used; see [Connect knowledge to agents](https://docs.trypopcorn.ai/knowledge/connect-to-agents.md).

* **Product details are stale.** Prices and stock come from the connected store; use **Resync products** under **Integrations** if the catalog is behind. See [Product catalog](https://docs.trypopcorn.ai/products/catalog.md).

* **The conversation is old.** An open conversation keeps the version it started with unless you published with **New chats and chats in progress**. New conversations already use the new version.

* **A fact is only in the old instructions.** An agent that was switched to Popcorn's rules no longer reads its instructions; their facts are in a Knowledge article named "Previous instructions of" followed by the agent's name. Keep that article published until its facts have moved. See [Popcorn's rules and Voice](https://docs.trypopcorn.ai/agents/popcorns-rules.md#agents-that-had-their-own-instructions).

* **It offers an option or product you no longer sell.** The agent only sends products that are active and, with **Product quantities** on in **Settings → General**, in stock (Shopify products are never treated as out of stock). Mark the product or variant inactive in your store or under **Products**, and resync if needed.

**Spotlight** tells you how often this happens: a low **Accuracy** score with the evaluator's note per conversation. See [Spotlight](https://docs.trypopcorn.ai/agents/spotlight.md).

## The agent replies in the wrong language

* **On Popcorn's rules**, check **Reply language** in the agent's **Voice**: **Always Arabic** or **Always English** override the customer's language. With **Same as the customer**, a greeting, "thanks", link or product name on its own does not switch the language; a customer can ask for another language by name. See [Reply language](https://docs.trypopcorn.ai/agents/popcorns-rules.md#reply-language).
* **For Arabic in the wrong style**, change **Arabic style** (**Saudi dialect**, **Gulf dialect** or **Formal Arabic**).
* **On custom instructions**, the language follows the instructions: state "Reply in the customer's language" and the dialect you want. See [Writing custom instructions](https://docs.trypopcorn.ai/agents/writing-instructions.md).
* The Voice applies only after you publish. Use **Preview replies** to hear it first.

## The agent hands over too often

| Cause | What to do |
| - | - |
| Handover topics or rules are broad. Under **Hand over to your team**, each topic's **When it applies** and the text under **When to hand over** (or **Other rules**) decide when the agent passes a chat on. | Narrow them to the cases a person really must handle, or remove a topic. See [Capabilities](https://docs.trypopcorn.ai/agents/capabilities.md). |
| The agent runs on Popcorn's rules and your Knowledge does not cover what customers ask. The rules offer your team rather than guess. | Add the missing facts to Knowledge; the Knowledge check suggests them from your team's answers. See [Review what your agent learned](https://docs.trypopcorn.ai/knowledge/knowledge-check.md). |
| **Block spam and off-topic chats** is on and the customer keeps sending flagged messages. Flagged messages get no reply, and the third one in the same conversation triggers a handover. | Expected for spam or manipulation attempts. Turn it off only if it flags genuine customers. |
| **Check replies before sending** is on with **Hand over to your team after the last retry**. Replies that miss the target score are retried, and after the last retry the conversation is handed over. | Lower **Minimum reply score (0 to 1)**, raise **Maximum retries**, or untick the handover option. See [Check replies before sending](https://docs.trypopcorn.ai/agents/ai-manager.md). |
| Credits ran out. Every new customer message is handed over until you top up. | Top up under **Plan and billing**. |

## The agent never hands over

* **Hand over to your team** is off. The agent can only hand over when it is switched on on the **Handoff** tab; turn it on, then publish.
* No handover topic or rule describes the situation. Add a topic with **Add topic**, or the case under **When to hand over**, for example "when a customer asks for a refund".
* **Hand over to your team after the last retry** under **Check replies before sending** needs **Hand over to your team** to be on as well; the tick box is disabled and reads **Turn on hand over to your team under Handoff to use this.** otherwise.

## Replies are slow

* **Delay replies** waits a random number of seconds inside the range you set (1 to 60 seconds) before every reply, to look more human. Turn it off or narrow the range **Reply delay, in seconds**.
* **Check replies before sending** retries a reply that scores below the target, up to **Maximum retries** times. Each retry adds time; the hint in the app warns that more retries can slow replies down.
* After publishing with **New chats and chats in progress**, open conversations switch version on their next reply; nothing is re-sent, so no delay comes from the publish itself.

## Follow-ups are not sent

* **Follow up when customers go quiet** goes out on WhatsApp only, in conversations the AI is handling, and only while the customer's last message is less than 24 hours old.
* Popcorn sends a follow-up only when something is still open in the chat. When it decides there is nothing to follow up, the conversation shows a line such as **Follow-up skipped: the conversation had ended**. That is expected. See [Capabilities](https://docs.trypopcorn.ai/agents/capabilities.md).
* No follow-up goes out after a template, after a message that failed to deliver, or when you replied from the WhatsApp Business app in the last 24 hours.

## Changes are not taking effect

| What you see | Why | What to do |
| - | - | - |
| A banner says **N unpublished changes. Live conversations use the published version.**, or the header shows **Publish changes** | Saving creates a draft; customers use the published version. | Click **Save and review**, then **Publish changes**. |
| The test chat still answers the old way after publishing | The chat resumed its previous conversation, which stays on the version it started with. | Click **Start a new conversation**, confirm **Start over**, then send a new message. |
| An open customer conversation still behaves the old way | Open conversations keep their version unless you chose **New chats and chats in progress**. | Publish again with that option, or wait for new conversations. |
| **Draft is out of date with the live agent configuration** when publishing | The agent changed after the draft was saved, for example a teammate saved edits or you connected Slack. | Click **Save and review** again, then publish. |
| *Couldn't turn on … Your other changes were saved.* after saving | The named tools could not be attached to the agent; every other change was saved. A tool does not need to be public to be connected. | Switch the tools on again and click **Save and review**. See [Create a custom tool](https://docs.trypopcorn.ai/tools/create-a-tool.md). |
| A number stays with another agent | A number can be attached to one agent at a time. | Switch it off on the other agent and publish there first. |

## The test chat or the sandbox behaves differently from live

* Both use the **published** version, so they cannot show unpublished edits (see above).
* On WhatsApp the agent remembers your earlier conversations from the same phone, as it does for a returning customer. Send `/reset-all` to start a test with no history. See [Start over on WhatsApp](https://docs.trypopcorn.ai/agents/test-and-publish.md#start-over-on-whatsapp).
* The test chat opens the agent you are editing. The **WhatsApp sandbox** always uses the workspace's **default** agent, which may be a different agent with different instructions and knowledge. Check the **Default** badge on the **Agents** page.
* The sandbox replies that the number is not linked to any organization if your phone number is not registered under **Manage sandbox numbers**, and that your organization does not have a default agent set up yet if the workspace has no default agent.
* Chats from the test chat on the agent page and from the sandbox are real: they appear in the Inbox and use credits, so what you see there is what a customer would get on the same version. Only the **Try your agent** chat on **Home** and **Try it as a customer** during onboarding are free; they are kept in **Test conversations**.

## Cannot set as default, publish or save

| Message | Meaning |
| - | - |
| **Publish to set as default** in the agent's row menu | The agent has no published version yet. Open it, save and publish, then choose **Set as default**. |
| **Set another default to delete** (the disabled **Delete** item) | The default agent cannot be deleted. Set another agent as default first. |
| **Agent name is required** / **Agent instructions are required** | The name must be filled in before the agent can be saved, and so must the instructions of an agent on custom instructions. On the **Create agent** page they read **Give the agent a name** and **Add instructions so the agent knows how to reply**. |
| **There's already a topic with this name.** / **Say when this topic applies.** | Each handover topic needs its own name and a **When it applies**. |
| **Publish your saved changes to add a suggested topic.** | **Add** under **Suggested topics** publishes the agent, so it waits until nothing is unsaved or unpublished. |
| **Turn on closing resolved chats first.** | **Follow up when customers go quiet** needs **Close resolved chats**. Turn that on first. |
| **Turn off follow-ups first.** | **Close resolved chats** cannot be switched off while **Follow up when customers go quiet** is on. |
| **Enter more than N hours, so your last follow-up can send first.** | **Close after (hours)** must be longer than your longest follow-up wait. |
| **Cannot apply this version: secret header(s) … can no longer be restored** | You are rolling back to or publishing a version that uses a tool whose credentials are gone. Reconnect the tool's credentials first. |
| **Couldn't delete** followed by a tool name | The tool is still used by an agent. Turn it off on each agent's **Actions** tab, save, then delete it. |

Publishing and rolling back need a role that can edit agents; setting the default agent needs a role that can manage agents. See [Team and roles](https://docs.trypopcorn.ai/settings/team-and-roles.md).

## Handover notifications do not arrive

* Notifications are only sent on a handover: the agent's **Hand over to your team**, **Block spam and off-topic chats**, or an automatic handover by Popcorn. Assigning a conversation manually does not send one.
* For Slack, **Slack alerts for handovers** must be on and the panel must show **Connected**; if it says **Slack isn't connected, so these alerts won't arrive yet.**, click **Connect Slack** (or **Reconnect Slack**). If you connected Slack after saving a draft, save again before publishing.
* For email, **Email alerts for handovers** must be on and at least one address must be listed under **Recipients**.
* Notification settings are part of the agent's version: after changing them, **Save and review** and **Publish changes**.
* A handover in a free test chat (**Test conversations**) alerts nobody.

See [Connect knowledge, tools, channels and notifications](https://docs.trypopcorn.ai/agents/connect-knowledge-tools-channels.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.