A second opinion on repetition¶
For: anyone who wants a stronger model to look at a small model's repetition without paying for it on every step. After this page you know when the monitor runs, what it may do, what it costs, and that it is off by default.
The problem¶
The harness can see that the agent is repeating itself: the same command twice, a cycle of commands, many reads of one file, or many steps that change no file. It cannot tell why. Polling a job that is still running looks the same as a stuck loop. Reading a big codebase before a plan looks the same as wandering. The fixed text it answers with has to be right for both, so it is either wrong for one of them or says too little.
What the research says¶
Is Self-Repair a Silver Bullet for Code Generation? (Olausson et al., ICLR 2024) found that the quality of repair depends on the quality of the feedback. Feedback from a stronger model drives most of the gain, and a weak model that repairs its own output without it gains much less. The monitor is that idea at the scale of one detector firing: a small agent keeps running, and a stronger model is asked only when the harness has a reason to ask.
What tether does¶
When a detector fires, the monitor reads a short digest and returns one verdict:
| Verdict | What the agent sees |
|---|---|
continue |
Nothing new. The repetition is expected, so the usual notice is left out or shortened to its fact |
note |
One line from the monitor, at most 200 characters, in the usual [LOOP] or [CHECK] form |
escalate |
The session stops as WAITING_INPUT with the monitor's reason, so the caller can answer it |
The digest is bounded (about 6,000 characters): the detector's fact, the goal, the last eight commands, the files changed so far and the tail of the last output.
What the monitor can never do: change the agent's system prompt or tool list (they stay the same for the whole session), raise the step, token or time budgets, skip a verify gate, or touch the sandbox. A monitor that fails, times out or returns something unreadable says continue; one that cannot be built at all (a mistyped model id) prints a warning and the usual notices stay. A broken monitor never stops the agent.
Turn it on with a model id, the same form as --model:
Any provider works, including the agent's own model. The monitor is asked at most six times per session.
What it costs¶
- Off by default. Without
--monitor, a run makes no monitor call and its prompts are the same as before. - With it on, one call per detector firing, at most six per session. Its tokens count in the session totals, so
tether statsand--max-tokenssee them. - Nothing per normal step. A step that no detector flags never reaches the monitor.
- Bounded wait. Each call has a 90-second deadline, since a thinking model takes 1 to 60 seconds. A call that misses it counts as
continue; after two misses the monitor is not asked again in that session, and a warning says so on stderr.
What we got¶
Not measured yet. The monitor ships opt-in, and it stays off by default until a lab shows a gain in pass rate or in tokens per solved task, with no rise in wrong escalations. The plan and the open questions are in #412.
References¶
- Olausson, T. X., Inala, J. P., Wang, C., Gao, J., and Solar-Lezama, A. (2024). Is Self-Repair a Silver Bullet for Code Generation? ICLR 2024.