claude-code - 💡(How to fix) Fix /goal evaluator has no circuit breaker — unsatisfiable conditions burn unlimited tokens

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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

Fix Action

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 /goal and /loop is not obvious -- "stop the loop" doesn't clear a goal
  • The assistant cannot intervene
RAW_BUFFERClick to expand / collapse

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)

  1. 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.
  2. Duplicate detection: If the evaluator returns the same reason N times consecutively (e.g., 5), auto-clear with a warning.
  3. Allow assistant to clear goals: Let the assistant call a tool or command to clear an unsatisfiable goal, perhaps requiring explicit justification.
  4. Turn limit syntax: Support or stop after N turns in the condition (reportedly works already but isn't prominently documented).
  5. 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 /goal and /loop is 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix /goal evaluator has no circuit breaker — unsatisfiable conditions burn unlimited tokens