Claude Opus 5.5

agents-0-24-0-5-b

Claude Code's read-only tools, web search on, ludion sync off

Question

My queued Agent callback can't see the request that queued it. Is that expected?

Answer key

A correct answer says
Callbacks queued with `this.queue()` run later from the alarm loop, so `getCurrentAgent()` inside them returns the agent but not the original `connection` or `request`.
The stale answer
Queued callbacks run in the same context and can read the enqueuing request's connection and request via getCurrentAgent().

The change's lesson

Answer

Yes, that's expected if "callback" means the spawned agent itself. A new Agent call starts fresh. It gets only the `prompt` string you passed, not the parent conversation or the user request that led to spawning it. Its final report also goes back to the parent agent, not to the user, so the parent has to relay anything that matters.

To fix it, put everything the agent needs into the prompt: the original request, the relevant file paths, and any constraints. If you need to follow up with an agent that already ran, use `SendMessage` with its ID or name, which keeps its context. Another `Agent` call starts over from nothing.

If you meant that the completion notification can't see the request, say so. That's a different problem, since the parent session should still have its own history when the notification arrives.

Answering cost $0.06.

Grade

wrong

The judge's reason: It misreads the question as being about Claude Code subagents, never mentions `this.queue()`, the alarm loop, or `getCurrentAgent()`, and makes unrelated claims instead of the key's fact.

The judge's log

Session log

What the agent wrote, the tools it called, and what they returned, from docs/bench/2026-10-11-done3/runs/B-project/agents-0-24-0-5-b.jsonl. Thinking and the session's settings are left out. The raw log

  1. Agent

    Yes, that's expected if "callback" means the spawned agent itself. A new Agent call starts fresh. It gets only the `prompt` string you passed, not the parent conversation or the user request that led to spawning it. Its final report also goes back to the parent agent, not to the user, so the parent has to relay anything that matters.
    
    To fix it, put everything the agent needs into the prompt: the original request, the relevant file paths, and any constraints. If you need to follow up with an agent that already ran, use `SendMessage` with its ID or name, which keeps its context. Another `Agent` call starts over from nothing.
    
    If you meant that the completion notification can't see the request, say so. That's a different problem, since the parent session should still have its own history when the notification arrives.