Skip to content
AAtom

Agent loop

How one turn runs, what bounds it, how to steer it.

One turn of conversation runs an observe, act, inspect, adjust loop: the model sees tool results and decides the next step until the work is done or a bound stops it.

One turn, step by step

  1. You send a message, optionally with queued follow-ups behind it.
  2. The model may call tools. Reads run immediately; writes and shell pause for your approval in normal mode.
  3. Each tool result returns as text and feeds the next decision. Failures arrive as Error: ... strings so the model can react rather than crash.
  4. Transient failures retry. A denied call is never retried: the model replans instead.
  5. Tokens, tool activity, and phase status stream live while this happens.

Bounds that end every turn

  • 30 tool rounds by default (ATOM_MAX_TOOL_STEPS, clamped 5 to 100). Termination is structural.
  • Compaction summarizes older turns near 83 percent of the verified window, so long work continues instead of dying.
  • /clear drops history while keeping cumulative spend, for a deliberate fresh start.

Steering a running turn

  • /queue <text> lines up a follow-up; /steer <text> injects into the running turn or sends when idle.
  • Esc stops a running response. The footer shows esc stops while busy.
  • Tab flips normal and yolo mid-session when the risk profile changes.
  • Tools for the executors, caps, and background tasks behind each step.
  • Permissions for the approval flow that gates writes.
  • Compaction for how long runs survive the context limit.