A support agent sometimes stops after its first tool call, telling the customer “Let me look that up” and then nothing else. The loop exits whenever the response contains any text.
A document-processing agent built on the Agent SDK is configured with max_turns=10. On a very long contract it stops, and the application shows an empty summary to the user.
A multi-agent research system is asked about the environmental impact of data centres. The report covers energy use thoroughly but says nothing about water consumption or e-waste. Each subagent completed its task without error.
An internal research assistant runs search, analysis, synthesis and report-writing subagents for every request. Staff like the long reports, but finance flags that one-line questions such as “When was our Leeds office opened?” cost as much as full research tasks.
A coordinator asks three subagents to “research the semiconductor shortage.” Two of them return nearly identical reports on current supply chains; the third covers the history of the crisis.
What change would most directly prevent the duplication?
A synthesis subagent produces a report that ignores most of the evidence gathered earlier. Logs show the coordinator spawned it with the prompt: “Write the final report from the research so far.”
A team defines three subagents with clear descriptions and passes them in agents. The coordinator's allowed tools are Read, Grep and Glob. In testing, the coordinator never delegates and does all the work itself.
Three analysis subagents each return findings with a URL and page number. The coordinator summarises their results in a paragraph and passes it to the synthesis subagent. The final report has almost no citations.
Policy requires identity verification before any refund. The system prompt says so in capital letters, yet an audit finds 0.4% of refunds were issued without verification.
A customer writes: “My order is late, I was charged twice, and I need to change my delivery address.” The agent refunds the duplicate charge and closes the conversation. The other two issues are never addressed.
Three MCP tools return dates as a Unix timestamp, an ISO 8601 string and a locale string. The agent occasionally misorders events. What is the best fix?
A PreToolUse hook blocks deletions outside a project folder. It returns deny with no reason. Logs show the agent retrying the same deletion several times, then telling the user it “encountered an error”.
What change best improves the behaviour while keeping the block?
A CRM MCP tool returns full customer records, including card numbers. Policy says card numbers must never enter the model's context, but the agent needs the rest of the record.
An agent is adding tests to a legacy codebase from a plan it wrote at the start. While testing the orders module, it discovers the module depends on an untested pricing library with inconsistent behaviour.
Yesterday an agent analysed a service in a session. Overnight, a teammate refactored most of the service's modules. You want to continue the work today.
A developer forks a session to try an experimental refactor. The fork edits several source files. Later, resuming the original session, the agent finds the experimental changes in the code.
A CI job runs an agent on one ephemeral worker and saves only the session_id. A follow-up job on a different worker passes that id as resume and fails because no conversation is found.
What is the most robust fix?
You can change answers until you check. Nothing is saved or sent anywhere.