Spaces:
Chris4K
/
Paused

Aksel Joonas Reedi commited on
Commit
e8ed637
Β·
unverified Β·
1 Parent(s): 07c5699

Keep repetition guard internal (#144)

Browse files

* Clarify repetition guard messaging

The loop breaker is intentional recovery behavior, but the user-facing 'doom loop' phrasing reads like a crash. Rename the visible log and system hint to a repetition guard while preserving the existing detector behavior and historical SFT tag compatibility.

Constraint: Existing trajectories may still contain the old wording, so the tagger must recognize both labels.

Rejected: Remove the event entirely | users would lose visibility into why the agent changed strategy.

Confidence: high

Scope-risk: narrow

Directive: Keep user-facing recovery logs operational and non-alarming; reserve internal jargon for code, not UI events.

Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_doom_loop_polling.py tests/unit/test_sft_tagger.py

* Hide repetition guard from user surfaces

The repetition guard is an internal control-flow intervention, not a status event users need to act on. Remove the CLI/frontend tool_log emissions while keeping the internal corrective prompt and logger warnings.

Constraint: Historical trajectories can still contain the old doom-loop log text, so the SFT tagger test keeps compatibility for existing data.

Rejected: Show a renamed repetition-guard event | the requested behavior is that this remains fully internal and invisible in CLI/frontend surfaces.

Confidence: high

Scope-risk: narrow

Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_doom_loop_polling.py tests/unit/test_sft_tagger.py

* Remove dead repetition tag branch

Review caught that no user-visible tool_log will contain the new repetition-guard text after this PR. Keep historical doom-loop log compatibility only and avoid a dead future-facing branch.

Confidence: high

Scope-risk: narrow

Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_doom_loop_polling.py tests/unit/test_sft_tagger.py

5 files changed +16 -19
Files changed (5)
agent/core/agent_loop.py-9
agent/core/doom_loop.py+8-4
agent/tools/research_tool.py+4-2
tests/unit/test_doom_loop_polling.py+3-3
tests/unit/test_sft_tagger.py+1-1