wiki / concepts / think-tool
Think Tool
loading…
Think Tool
Anthropic’s think-tool technique: give the LLM a think tool that does nothing — its execute simply returns the thought argument passed to it. The value is not an action but a structured pause: the thought is appended to the message history, saving important information in context so later iterations of the tool calling loop can make better decisions.^[raw/aihero/implementing-anthropics-think-tool-in-typescript.md]
flowchart LR
A["Complex tool call"] --> T["Think (no-op)"] --> B["Next tool call, informed"]
Mechanics
The tool is ordinary tool-calling: a description (“use it when complex reasoning or some cache memory is needed — it will not obtain new information or change the database, just append the thought to the log”) plus a JSON-schema thought: string parameter. The execute function returns the thought unchanged; persistence in the llm message protocol history does the rest. Echoes ReAct and Reflexion.
Why It Works
The model gets an explicit, schedulable slot to reflect between steps instead of cramming all reasoning into one response — a tool-surface application of the same principle behind smart zone and context staging: put the right information in the right place in history for the decision that needs it.
Failure Modes
| Symptom | Root cause | Fix |
|---|---|---|
| Tool call storms without progress | Agent retries failing calls blindly | Force a think step after every failed call; log the diagnosis |
| Notes ignored on later turns | Scratchpad not re-injected | Re-inject the note summary into subsequent prompts |
| Think used as a delay tactic | No binding between thoughts and next action | Each thought must name the next concrete action |
Rule of Thumb
One thought per decision point; a thought that does not change the next action was wasted context.
Related
tool calling loop, llm message protocol, generator evaluator loop, smart zone, context engineering.
| raw/aihero/implementing-anthropics-think-tool-in-typescript.md | internal workspace doc |