/goal evaluator has no circuit breaker — unsatisfiable conditions burn unlimited tokens
Problem
The /goal evaluator runs after every assistant turn with no iteration limit or circuit breaker. If the goal condition becomes unsatisfiable, the evaluator fires indefinitely. Only the user can clear it with /goal clear. The assistant cannot clear or modify a goal programmatically.
Incident
A /goal was set to find a specific genealogy source online. After exhaustive searching, the source turned out to already be documented. The user acknowledged this in conversation ("it was probably the burial and we never got the death") but didn't run /goal clear. The evaluator kept firing the same "condition not satisfied" feedback on every turn for 200+ iterations over 5 hours, consuming approximately 50% of weekly token budget. Each turn processed the full conversation context even though the assistant produced empty responses.
Root cause
- No max-iteration limit on goal evaluation
- No detection of repeated identical evaluations
- No way for the assistant to clear or modify a goal
- No automatic escalation or warning to the user after N failed evaluations
Suggested fixes (any of these would help)
- Max iteration config: Add a configurable max evaluation count (default ~20). After N consecutive "not satisfied" results, auto-clear the goal and notify the user.
- Duplicate detection: If the evaluator returns the same reason N times consecutively (e.g., 5), auto-clear with a warning.
- Allow assistant to clear goals: Let the assistant call a tool or command to clear an unsatisfiable goal, perhaps requiring explicit justification.
- Turn limit syntax: Support
or stop after N turnsin the condition (reportedly works already but isn't prominently documented). - Budget guard: Halt goal evaluation if token spend in the current session exceeds a configurable threshold.
Workaround
The only current workaround is for the user to remember to run /goal clear. This fails in practice because:
- The user may step away after setting the goal
- The distinction between
/goaland/loopis not obvious -- "stop the loop" doesn't clear a goal - The assistant cannot intervene
Environment
- Claude Code CLI
- Model: claude-opus-4-6 (1M context)
- Platform: Linux
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗