Claude Code · the harness
~/repo · main
you
›
find the bug in this repo, fix it, run the tests, don't break anything else
CONTEXT WINDOW
48% full
THINK
reasoning & planning
ACT
call tools
OBSERVE
read results
REPEAT
until done
Claude · the model
TOOLS
PERMISSIONS
allow
ask
deny
📁
files
read · write
⬛
terminal
run commands
⚗️
tests
npm test
⑂
git
diff · commit
The Loop · Stage Reference
THINK
The model reads the full context window and reasons about what to do next. No tools called yet — pure inference.
The model reads the full context window and reasons about what to do next. No tools called yet — pure inference.
ACT
The model emits a tool call: Read, Grep, Bash, Edit, etc. The harness intercepts and executes it.
The model emits a tool call: Read, Grep, Bash, Edit, etc. The harness intercepts and executes it.
OBSERVE
Tool output is appended to the context window. The model sees the result and decides: continue or done?
Tool output is appended to the context window. The model sees the result and decides: continue or done?
Live Stats
0
Loop iterations
0
Tokens generated
0
Tool calls made
0
Tests passed
Context Capacity
Real context windows: 8k–2M tokens depending on model. When full, older turns are evicted or summarised.