Anthropic employee tests Claude Code /goal: Stop hook drives goal checks until conditions are met
Ado Kukic demonstrated that Claude Code's /goal is under the hood a session-scoped Stop prompt hook: the checker reads the goal and the conversation, and each rejection comes with a reason to guide the next round.
The author explains the /goal Stop hook mechanism based on first-hand testing and offers goal formulations that can be verified against the conversation log, making it easy to adapt to your own Claude Code workflow.
Under the hood it's a session-scoped prompt hook on Stop. The checker reads your condition plus the conversation, and every "not yet" comes with a reason that steers the next turn.
I tried "/goal build a modern game engine in Rust comparable to Unity or Unreal". It said "not yet" 25 times, into the next morning. The checker runs no tools, so it judges only what Claude has shown, and Claude kept writing that the engine was "not yet a peer of Unity or Unreal".
I still got a real engine out of it: renderer, physics, an editor and a stack of sample games.
Write a goal the transcript can prove:
- /goal cargo test --workspace passes and the demo holds 60 fps, or stop after 30 turns
- /goal npm test exits 0 and git status shows only src/ changed
Source: Ado · x.com