/goal hook fires "Goal Achieved" while TaskList tasks still pending/in_progress

Resolved 💬 2 comments Opened May 12, 2026 by jlixfeld Closed May 25, 2026

Summary

The session-scoped /goal Stop hook fires a "Goal Achieved" notification mid-execution, even when the agent still has tracked tasks in pending / in_progress status via TaskCreate / TaskList. This produces user-visible confusion: the UI says the goal is achieved, but the agent reports the work isn't done.

Repro

  1. Start a long multi-step implementation in a single session.
  2. /goal write plan, implement plan
  3. Agent writes an 11-task plan via writing-plans skill and starts executing through subagent-driven-development.
  4. Tasks 1–8 land as commits. Tasks 9 (parity sweep), 10 (backtest validation), 11 (final verification + handoff) still tracked as pending / in_progress.
  5. UI surfaces "Goal Achieved" while the agent is still mid-execution.
  6. User asks "is this done?" — agent (correctly) answers "no, 3 tasks remain."

Expected

Either:

  • The /goal hook consults TaskList and only fires when no pending / in_progress items remain, OR
  • The notification text is clarified to indicate it's an advisory match against the natural-language condition, not a definitive completion check.

Actual

The hook appears to evaluate the natural-language goal condition against some loose heuristic (presence of plan + most impl commits) without consulting the structured task tracker. Result: false-positive "achieved" while tracked work remains.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-7
  • Long-running background session with 30+ subagent dispatches
  • Goal text: write plan, implement plan

Why it matters

Users rely on hook notifications as a signal of completion. A premature "achieved" undermines that signal and forces users to manually cross-check TaskList to know what's actually done.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗