Step 2: Extract AgentTurnContext dataclass from run_stream()
Move 10 turn-level local variables from run_stream() into AgentTurnContext:
- turn_start, tool_call_count, turn_tokens, subagent_tokens
- stall_no_todo, stall_repeat_tools, prev_tool_sigs
- known_failed, replan_msg, injected_fact_ids

This makes run_stream() readable and prepares the ground for
AntiStallMonitor (Step 3) which will consume this context.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent d67992a commit d004530d21e32280d38917c1c5caad88449e8e42
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 16 May
Showing 2 changed files
View
navi/core/agent.py
View
navi/core/agent_run_context.py 0 → 100644