Skip to main content

Troubleshoot a background agent

Open Build > Background Agents and select the affected agent. Start with the symptom below. For infrastructure failures on your own runtime, use that runtime's setup or deployment guide.

A platform is missing​

Check Agent Types in organization settings. Enable the runtime and supply its required configuration. The creation form lists enabled runtimes, not every platform value accepted by the API.

Deployment fails​

Read the deployment error under Settings > Platform > Deployment & Sync. Check the runtime's configuration and credentials, then deploy again. For platform-specific errors, use the setup guide linked from Platforms.

On a registered platform using pull delivery, Waiting for platform means Willow is waiting for the runtime to collect and acknowledge work. Ask the runtime operator to check collection and connectivity; see Use the harness in your cluster.

The agent is Active and Synced but tools fail​

  1. Open Capabilities and check the affected MCP server's authentication control.
  2. If it reads Auth not set, choose and save the integration identity.
  3. On a per-user server, replace Use the MCP server default with an initiator or connected account. The default does not supply an agent identity on these servers.
  4. Check that the required individual tool is enabled.
  5. Inspect the failed call in Monitor > Logs. Authentication, policy, arguments, and upstream errors require different fixes.
  6. Deploy saved changes where applicable and repeat the affected test.

A tool times out reaching a private address, or shows Gateway mismatch​

An agent's tool calls go through the gateway selected for it. If an MCP server runs on a different gateway, such as a self-hosted gateway or a tunnel that can reach your private network, while the agent is served from another gateway, the call may never reach the server. On Capabilities, that server's group shows a Gateway mismatch badge, and the call can fail with a connection timeout to an internal address.

  1. Open the agent's Settings tab, then Platform > Gateway.
  2. Select the gateway the agent's MCP servers run on. Gateways that already serve this agent's servers are marked Suggested.
  3. Deploy or connect the agent again, then repeat the call.

The Gateway selector only appears when your organization has more than one gateway. To run the agent's own runtime inside your network as well, see the harness reference.

A tool says the triggering user's identity wasn't provided​

A tool set to Run as the initiator needs to know who triggered the run. When a run has a triggering user, Willow appends an [Auth] block to the delivered message (for example on kagent) with a willow_actor_token. The agent must pass that value, exactly as given, as the willow_actor_token argument on each such tool call and never show it to anyone. A scheduled run has no triggering user. If your own runtime calls the agent's MCP endpoint directly, send the person as a verified x-user-token on every call (see How agents authenticate to Willow). For what the token is and what it proves, see What the actor token proves.

If the error instead says no user in the organization matches the email or ID, the value isn't a Willow user. If it says the person needs to connect the application first, ask them to connect it in Willow, then retry. If it says a person's Willow sign-in is no longer valid, their kept sign-in has expired or was revoked, or they were deactivated — ask them to sign in to Willow again, then retry. See Choose the integration identity.

An external client stops authenticating​

Check whether the client's token was recreated or revoked, or the agent was disabled. A recreated token's previous secret becomes invalid. Deploying replaces only the platform token, so use a manual token for an external client to keep it working across deploys. Copy the exact endpoint from Connect; gateway path prefixes are part of that URL. See Agent credentials.

A Slack agent stays silent​

Check that the dedicated Slack app is connected under Settings > Slack. In Triggers > Channels, check the channel's response mode and the direct-message default. Confirm that the app is present in the intended channel. See Slack setup troubleshooting.

The agent returns an answer without the expected tool call​

Inspect the session events. If no relevant tool was called, check that the tool is assigned and enabled, then make the test request explicit about using it. Compare the actual tool output with the answer. A plausible answer alone does not verify the connection.

For upstream tool errors, test the MCP tool to isolate the server connection from the agent's behavior.

No sessions are listed​

A newly configured agent has no run history. Confirm that a test or matching trigger actually started a conversation. Check the result at the runtime and its supported session interface; the dashboard and API entry points have platform-specific behavior.