feat(harness): opt-in monitor companion: a second model judges a detected repetition (continue, note, escalate)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- ai-infra-agents
Research direction
Start by reading the existing repetition detectors and [CHECK] notice work described in the issue, then inspect the harness configuration and provider paths. The proposal requires an opt-in monitor, bounded input and output, and behavior for three verdicts plus malformed replies. Done means the acceptance scenarios pass and the architecture decision, Concepts documentation, and release note are added.
Written by the indexing model from the issue text.
Description
Problem
The harness detects repetition deterministically (same command again, 2-4 command cycles, N reads of one file, a long run of steps that change no file; AD-21, AD-50, AD-20) but can only answer with fixed text. Fixed text cannot tell a legitimate repetition (polling a job, reading a big codebase for a plan) from a stuck model, so it either steers wrongly (today's [LOOP] notes tell a polling model to "make the edit or call done") or says too little. Measured: the explore nudge moved nothing (next step 38/55 with it, 38/55 without, 11 stored firing points), and nudge wording variants measured flat.
Proposal
An opt-in monitor: a second model call that runs only when a deterministic detector fires, reads a short digest of what the agent is doing and returns one verdict:
| verdict | what the harness does |
|---|---|
continue |
nothing; the repetition is expected (polling, broad reading). No note, no tokens in the agent's context |
note |
appends one line written by the monitor, in the [CHECK] what happened. what to do form (capped, e.g. 200 chars) |
escalate |
hands the session back as WAITING_INPUT with the monitor's reason (the existing stuck hand-back path; a sub-agent's parent gets it) |
- Trigger: the existing detectors only (the stall guard, the quiet-step streak). No detector, no monitor call: 0 tokens in a normal run.
- Input digest (bounded, about 1,500 tokens): goal, detector fact (
7 reads of x.py,12 steps, no file changed: cat x8, grep x3), the last N command heads, the tail of the last observation, files changed so far, last test summary. - Output: a tiny fixed schema (
{"verdict": ..., "note": ...}); anything else counts ascontinue(fail open, Rule 3: never hang, never crash). - Config:
--monitor <model>/Harness(monitor=)/ providers.yaml / skill frontmatter; off by default. Any provider works (model-agnostic), including the same model as the agent. - KV cache: a separate call; the agent's prefix and
toolsnever change (Rule 1). - Bounds stay deterministic: the monitor never overrides the sandbox, budgets,
donegates or the AD-21 skip of a stalled repeat; it only chooses between silence, one note and a hand-back. It adds no interception outside the list in gate line 8.
Why it could work
- Self-repair gains come mostly when feedback comes from a stronger model (Olausson et al., ICLR 2024, already cited for AD-21). A small local agent with a strong monitor that is called rarely gets that feedback at a fraction of the cost of running the strong model throughout.
- The detector supplies the "when" deterministically and cheaply; the model supplies the judgement that fixed text cannot.
Risks to measure before it ships
- Tokens and latency per call (only on detector firings; report calls per session and tokens per solved task).
- A small monitor (same model as the agent) may judge no better than the fixed
[CHECK]text; a too-eager monitor escalates solvable tasks (in a headless run with no human, an escalation is a failure). - Philosophy gate: line 2 (every per-turn addition shows a measured gain), line 8 (model orchestrates: the monitor informs, the agent still decides, except for the escalate bound), line 10.
Depends on
The [CHECK] notice lab (one note form for every repetition, "is that the plan? go on, change approach, or done --ask"), running now. The monitor reuses its detectors and note form; if [CHECK] lands, the monitor is the same pipeline with a model choosing the verdict.
Acceptance
- Off by default; no detector firing = no extra call (unit test with a scripted provider).
- Golden trace for a
noteverdict; e2e scenarios forcontinue,note,escalateand a malformed monitor reply (fail open). - Lab on the repetition scenarios (bug fix from a symptom, read-all summary, code Q&A, web research, legitimate polling, impossible task that should be asked, Polyglot subset) with the monitor = agent model and = a stronger model, against
[CHECK]alone: it must beat[CHECK]on outcome or tokens per solved task, with no rise in false escalations. - An AD entry in
docs/architecture/decisions.md, docs page under Concepts with the citation, release note.
- Dominant language
- Python
- Stars
- 3
- Forks
- 1
- Avg merge
- 1h 10m
- Merged PRs (30d)
- 175
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from igormcsouza/tether
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
igormcsouza/tether#428 ·
Maintainers usually reply within 1 day
-
landlock: jailed exec of bash refused on GitHub ubuntu-26.04 runner with Python 3.12 (3.13 passes)Openknown-issue
Difficulty 4/5 1-2 days Newbie friendliness 48/100
igormcsouza/tether#424 ·
Maintainers usually reply within 1 day
-
feat(api): tether serve, an optional local HTTP + SSE API for external UIs (no UI in this repo)Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
igormcsouza/tether#387 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
igormcsouza/tether#386 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 18/100
igormcsouza/tether#385 ·
Maintainers usually reply within 1 day
All issues in igormcsouza/tether
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
hugohe3/ppt-master#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 89/100
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4716 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
pcqpcq/open-source-android-apps#619 ·
Maintainers usually reply within 1 day
-
contribution Windows 主机
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Lee-xeo/Claude-Cage#1519 ·
Maintainers usually reply within 1 day