Skip to main content

Module executor

Module executor 

Source
Expand description

Turn executor — the monitor_turn / handle_deepseek_turn leg (issue #5261 / #3313).

This will own handle_deepseek_turn, the steer/subagent drains, refresh_system_prompt(), should_compact/compact_messages_safe, MessageRequest build, parallel tool exec, StuckGuard/ ReadRepeatGuard/ToolCallBudget, and stream retry budget. The move is file-by-file from crates/tui/src/core/engine/turn_loop.rs (5,706 lines) so the diff stays reviewable. Until the move lands this file carries the executor type and the execpolicy gate that guarantees approvals route through the turn context identically in both modes.

Structs§

TurnExecutor
Per-turn execution context. The execpolicy engine is the sole authority for approvals; both TUI and headless construct it from the same permissions.toml / ConfigStore so the gate never diverges.