Troubleshooting
Common issues and how to fix them.
The API returns fewer messages than expected
Make sure you're sending the full message history on each sendMessage call. The platform persists whatever history you send — if you only send the last message, only that message will be stored in our database. The agent itself knows the full history from its local files, but the API response reflects what you sent.
Auth & token issues
- 401 Unauthorized — your API key is missing or invalid. Re-run
an loginor checkAPI_KEY_21STin your environment. - Token exchange failing — ensure your
/api/an-tokenroute is correctly callingcreateTokenHandlerwith a valid API key.
Agent not responding
- Sandbox expired — idle sandboxes are destroyed after a timeout. The next message will create a new sandbox automatically.
- Max turns reached — the agent hit its
maxTurnslimit. Increase it in the agent config or per-request viaoptions.maxTurns. - Budget exceeded — if
maxBudgetUsdis set and the cost exceeds it, the agent stops.
Tool permission errors
If the agent can't execute a tool, check the permission mode in your agent config. In default mode, risky tools require user confirmation. Use bypass for fully autonomous agents in isolated sandboxes.
SSE streaming drops or doesn't start
Ensure your client supports Server-Sent Events and that no proxy or CDN is buffering the response. Check the Logs page in the dashboard for error details on the specific dialog.
Deploy fails
- Missing entry point — ensure
agents/<slug>/index.tsexists with a default export usingagent(). - Invalid API key — re-run
an login. - Bundle too large — keep agent code small, avoid heavy dependencies in the entry point.