mirror of
https://github.com/OthmanAdi/planning-with-files.git
synced 2026-04-26 08:26:01 +03:00
[GH-ISSUE #68] Stop hook exits with error code when task is incomplete (normal state) #43
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/planning-with-files#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @haimat on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/OthmanAdi/planning-with-files/issues/68
Description
The
check-complete.shstop hook exits with code 1 when not all phases intask_plan.mdare marked complete. This causes Claude Code to display an error:The problem: An incomplete task is a normal state — users frequently pause work, switch contexts, or end sessions mid-task. The stop hook should report status, not fail.
Steps to reproduce
task_plan.mdwith multiple phases**Status:** in_progressor**Status:** pending/clearVerification: When all phases are marked
**Status:** complete, the error disappears.Expected behavior
Hook reports completion status (informational) and exits 0.
Actual behavior
Hook exits 1, causing Claude Code to display an error message.
Root cause
In
scripts/check-complete.shlines 36-44:Suggested fix
Always exit 0, use stdout for status reporting:
Environment
@OthmanAdi commented on GitHub (Feb 4, 2026):
The fix has been applied to master — thanks @haimat for this report!
Scripts now always exit 0. Status is reported via stdout:
[planning-with-files] ALL PHASES COMPLETE (3/3)[planning-with-files] Task in progress (1/3 phases complete)[planning-with-files] No task_plan.md found — no active planning session.No more "Stop hook error" in Claude Code.