[BUG] TODOs are too strictly followed, no intermediary steps
Environment
- Platform (select one):
- [X] Anthropic API
- Claude CLI version: 0.2.99 (Claude Code)
- Operating System: macOS 15.4.1
- Terminal: iTerm2
Bug Description
Since adding "todo" functionality, Claude very strictly sticks to the list of TODOs.
I sent a message like this:
commit and push if you haven't yet. Fix all warnings and errors before continuing.
Please take a look at
https://github.com/anthropics/anthropic-cookbook/blob/main/tool_use/parallel_tools_claude_3_7_sonnet.ipynb and
https://docs.anthropic.com/en/docs/build-with-claude/tool-use/overview#parallel-tool-use
Note that there are references to "parallel tool use". I'd like to detect if the model is "claude sonnet 3.7"
and if so I'd like the "send message" to include token efficient tool use header (see
https://docs.anthropic.com/en/docs/build-with-claude/tool-use/token-efficient-tool-use) via our anthropic
service. I'd also like to make sure that our anthropic service handles multiple "tool_use" requests from
Claude and properly executes them all.
Claude created a TODO like this:
⎿ ☐ Fix linting error in AnthropicService.ts
☐ Implement token-efficient tool use header for Claude 3.7 Sonnet
☐ Add support for parallel tool use execution
☐ Add model version detection for Claude 3.7 Sonnet
☐ Commit and push changes
And then it started hallucinating output rather than looking at any of the relevant links during each part of the step. I had to interrupt it and tell it to actually look at the links I sent.
Steps to Reproduce
See above
Expected Behavior
Claude should include "URL fetching" in the TODOs or it should incorporate earlier instructions when following TODOs so it knows when to fetch additional context.
Actual Behavior
Claude strictly followed the "Implement token efficent tool use header" as its primary instructions, and invented a "Header block" for the system prompt.
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗