Preflight Checklist
What's Wrong?
Setting a long goal via /goal installs a session-scoped Stop hook whose condition is the entire goal text verbatim. On every Stop, the hook evaluator
re-sends that text to the model. If the goal is long enough, the evaluator rejects it with:
Hook evaluator API error: Prompt is too long
Once this state is reached, the turn cannot Stop cleanly until the goal is cleared.
What Should Happen?
Either:
- /goal rejects or truncates input that would exceed the Stop-hook evaluator's prompt budget, with a clear message at set time; or
- The Stop-hook evaluator handles an oversized condition gracefully (skip, warn, or summarise) instead of blocking Stop.
The Stop hook should never become unable to evaluate itself because the user provided a long goal.
Error Messages/Logs
Hook evaluator API error: Prompt is too long
Steps to Reproduce
- Start a Claude Code session in any project.
- Run /goal with a long multi-paragraph argument. A reliable repro is to paste ~30+ lines including file paths, a plan pointer, and a paragraph of constraints
— for example:
/goal Please work from this handoff plan:
/path/to/docs/superpowers/plans/<long-plan-name>.md
Repo path:
/path/to/repo
Goal: <several lines of overarching aim>
<several more lines of constraints, directives, "do not do X",
"start with Task 1 then Task 2", etc.>
- Work normally for a turn or two — text generation and tool calls all succeed.
- Reach the end of a turn so that Stop fires.
- The Stop hook errors with Hook evaluator API error: Prompt is too long and blocks the Stop. Subsequent Stops repeat the same error.
Workaround that recovers cleanly: /goal clear. After clearing, Stop works again. Short single-sentence goals do not trigger the bug.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.139
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
- The failure depends only on the length of the /goal argument, not on the project, the tools used, or the model's responses during the turn.
- Likely root cause: the Stop hook's evaluator prompt includes the literal goal-condition text on every Stop, so the evaluator's prompt grows proportionally to
the goal length. Once the condition pushes the evaluator over its own context budget, every Stop fails identically.
- Suggested fix direction: either cap /goal argument length at set time with a friendly error, or have the Stop-hook evaluator fall back to a compact
representation (hash + truncated preview) when the literal condition would exceed budget.
Preflight Checklist
What's Wrong?
Setting a long goal via /goal installs a session-scoped Stop hook whose condition is the entire goal text verbatim. On every Stop, the hook evaluator
re-sends that text to the model. If the goal is long enough, the evaluator rejects it with:
Hook evaluator API error: Prompt is too long
Once this state is reached, the turn cannot Stop cleanly until the goal is cleared.
What Should Happen?
Either:
The Stop hook should never become unable to evaluate itself because the user provided a long goal.
Error Messages/Logs
Steps to Reproduce
— for example:
/goal Please work from this handoff plan:
Workaround that recovers cleanly: /goal clear. After clearing, Stop works again. Short single-sentence goals do not trigger the bug.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.139
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
the goal length. Once the condition pushes the evaluator over its own context budget, every Stop fails identically.
representation (hash + truncated preview) when the literal condition would exceed budget.