[BUG] Task blockedBy data persists after blocker completion (display-only unblock)
Resolved 💬 2 comments Opened Jan 31, 2026 by rayk Closed Mar 1, 2026
Description
When a blocker task is completed, the blockedBy relationship persists in the data but is filtered from TaskList display. This creates an inconsistency where TaskList shows the task as unblocked, but TaskGet and the JSON file still show the blocking relationship.
When a blocker task is deleted, the blockedBy data is properly removed.
Steps to Reproduce
1. TaskCreate({ subject: "Blocker", description: "..." }) → Task #1
2. TaskCreate({ subject: "Blocked", description: "..." }) → Task #2
3. TaskUpdate({ taskId: "2", addBlockedBy: ["1"] })
4. TaskList() → Shows: #2 [pending] Blocked [blocked by #1]
5. TaskUpdate({ taskId: "1", status: "completed" })
6. TaskList() → Shows: #2 [pending] Blocked ← No [blocked by] indicator
7. TaskGet({ taskId: "2" }) → Shows: Blocked by: #1 ← Still shows!
8. Read ~/.claude/tasks/{sessionId}/2.json → blockedBy: ["1"] ← Still in data!
Comparison: Completion vs Deletion
| Action | TaskList | TaskGet | JSON blockedBy |
|--------|----------|---------|----------------|
| Blocker completed | Filtered out | Still shows | Unchanged |
| Blocker deleted | Filtered out | Filtered out | Removed |
Expected Behavior
Either:
- Option A: Completion should also remove the blockedBy entry (consistent with deletion)
- Option B: TaskList should also show the blockedBy indicator for completed blockers (consistent with TaskGet/JSON)
- Option C: Document this as intentional behavior if by design
Impact
- Confusion:
TaskListandTaskGetshow different blocking states for the same task - Stale data: Completed blocker IDs accumulate in blockedBy arrays
- Workaround needed: Must delete blockers (not complete) or edit JSON directly to fully clear relationships
Environment
- Claude Code version: 2.1.27
- OS: macOS (Darwin 25.2.0)
- Model: claude-opus-4-5-20251101
Additional Context
Discovered during systematic testing of Task tools. Full experiment documented at:
- Experiment 25 in local task-tools-reference.md
Related issues:
- #21356 (metadata not exposed in TaskGet) - similar data visibility inconsistency
- #21901 (VSCode Task tools) - mentions "automatic unblocking when dependencies complete"
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗