[Bug]: Claude Code sessions never get a to-do tool, so the plan panel is always empty for Claude
What went wrong?
Claude Code chat sessions never show the plan (to-do) panel, because the agent has no to-do tool to call in AO's launch of it. Codex and Cursor sessions get the panel; Claude sessions never do, even when the user asks for a to-do list in so many words.
Repro (AO desktop from main, Claude Code 2.1.296 via the bundled @agentclientprotocol/claude-agent-acp 0.70.0):
- Open a Claude Code chat session.
- Send: "Use your to-do list tool for this. Create a to-do list with these 10 items, then work through them one at a time, marking each in progress and completed." (any 10 trivial read-only steps).
- Watch the turn.
What happens
- The agent runs
ToolSearchfortodo list task create update(three times in one turn) and gets back unrelated tools (Docs, Drive, Cron); noTodoWrite,TaskCreate,TaskUpdateorTaskList. - It then falls back to narrating in prose:
[done] 5. … [in progress] 6. …, and on a second run says outright: "I still don't have a to-do list tool. I looked for TodoWrite, TaskCreate and TaskUpdate and none exist in this session." conversation_turns.plan_jsonstays empty for the turn, so the chat's plan panel has nothing to render.
What should happen
Claude Code has a to-do tool available (TodoWrite, or the newer TaskCreate/TaskUpdate), its calls reach AO as plan updates, plan_json fills in, and the plan panel renders and ticks along like it does for Codex.
What's already in place
- The bundled adapter maps both
TodoWriteandTaskCreate/TaskUpdate/TaskListto ACPplansession updates (frontend/resources/acp-runtime/node_modules/@agentclientprotocol/claude-agent-acp/dist/acp-agent.jsaround lines 1078 and 6560;dist/tools.jscase "TodoWrite"/applyTaskCreate). - AO turns an ACP
planupdate intoChatEventPlanUpdated(backend/internal/adapters/chatdriver/acp/client.go:694), which is what the panel reads.
So the missing piece is only that the agent process never has the tool.
Observed launch
The claude child is started as claude --output-format stream-json --verbose --input-format stream-json --permission-prompt-tool stdio --tools default --mcp-config … with CLAUDE_CODE_ENTRYPOINT=sdk-ts. AO's claudeacp driver sets no tool-related flags of its own; the flags come from the adapter/SDK. Claude Code 2.1.296 gates these tools behind CLAUDE_CODE_ENABLE_TASKS (on unless explicitly false) and CLAUDE_CODE_ENABLE_TODO_TOOLS.
Things to check for the fix
- Whether the adapter or SDK passes
disallowedTools/allowedToolsthat drop the to-do tools, or whether--tools defaultexcludes them under the SDK entrypoint. - Whether
CLAUDE_CODE_ENABLE_TODO_TOOLSneeds to be set for SDK sessions, and whether the SDK setsCLAUDE_CODE_ENABLE_TASKS=false. - Whether the deferred tool catalog (what
ToolSearchcan find) simply omitsTask*tools in SDK mode.
A small headless run that prints the agent's init tool list would settle it. A Go test around the launch env/options would keep it from regressing.
Impact
Every Claude Code session in AO: no plan panel, and no way for the agent to track multi-step work the way the other harnesses do. The UI work on the panel itself (#6884) is independent of this.
I'd like to work on this.
I reproduced it locally (Claude Code 2.1.302, AO from main). Launching claude with AO's flags (--output-format stream-json --input-format stream-json --permission-prompt-tool stdio --tools default) and reading the init tool list:
- default and
CLAUDE_CODE_ENTRYPOINT=sdk-ts: 26 tools, no to-do tools (Task/TaskStopare the subagent tools) CLAUDE_CODE_ENABLE_TASKS=truealone: no changeCLAUDE_CODE_ENABLE_TODO_TOOLS=1: addsTaskCreate,TaskGet,TaskList,TaskUpdate
In the app, a Claude chat session with this prompt ends with an empty plan_json and the agent saying it has no to-do tool. The same prompt in a session launched with CLAUDE_CODE_ENABLE_TODO_TOOLS=1 fills plan_json with the steps.
Plan: set CLAUDE_CODE_ENABLE_TODO_TOOLS=1 in claudeACPLaunchEnv (claudeacp/driver.go), without overriding a value the user already set, with a test in driver_test.go.