
/goal in Claude Code: keep a session running until the condition holds
Anthropic shipped the /goal slash command. A session-scoped wrapper over a prompt-based Stop hook: you write a condition, a small evaluator reads the transcript after each turn, and the session ends only when it says yes. When to reach for /goal, when for /loop, when for a Stop hook — and why you write the condition for Haiku, not for the main model.
Jakub KontraDeveloper