Skip to content

Remove auto-chain handoffs from pipeline phases#1

Merged
maxfindel merged 1 commit into
mainfrom
fix/remove-auto-chain-handoffs
Feb 17, 2026
Merged

Remove auto-chain handoffs from pipeline phases#1
maxfindel merged 1 commit into
mainfrom
fix/remove-auto-chain-handoffs

Conversation

@maxfindel
Copy link
Copy Markdown

Summary

  • Remove handoffs with send: true from all four pipeline phase commands (specify, plan, tasks, implement)
  • Each phase now completes its work, reports what it did, and stops — the caller decides when to advance

Problem

The send: true handoff frontmatter causes the entire speckit pipeline to fire as one unstoppable chain: specify → plan → tasks → implement. In automated/headless environments (orchestrators, CI, remote pods), this creates serious issues:

  1. Session contamination — phases inherit stale context from prior runs on the same environment, causing the pilot to work on the wrong issue
  2. Zombie processes — auto-chained phases spawn child processes that survive killall, requiring killall -9
  3. Wrong-issue execution — when an environment is reused for a different issue, the chained phase picks up leftover spec/plan files from the previous issue
  4. No verification checkpoint — the orchestrator cannot inspect results, run tests, or course-correct between phases

Evidence (6 production runs, 2026-02-17)

Issue Incident Time Lost
github#1303 /speckit.specify auto-chained, pilot fixed unrelated test infrastructure on master ~15 min
github#1310 3 consecutive speckit attempts auto-chained to issue github#1316 context ~15 min
github#1310 Zombie speckit process committed github#1316 fix onto github#1310 branch ~10 min

Total: ~40 minutes lost to auto-chain in a single day across 6 runs.

Fix

Remove all handoffs frontmatter from the four pipeline templates:

  • templates/commands/specify.md — removed Plan + Clarify handoffs
  • templates/commands/plan.md — removed Tasks + Checklist handoffs
  • templates/commands/tasks.md — removed Implement + Analyze handoffs
  • templates/commands/implement.md — removed Analyze handoff

Utility commands (clarify, analyze, checklist) already had no handoffs — no changes needed.

Impact

  • Interactive users: Each phase now stops and reports. User runs next phase explicitly. This matches the documented workflow (/speckit.specify → review → /speckit.plan → review → etc.)
  • Automated orchestrators: Can now verify results, run tests, and course-correct between phases — which is the entire point of a phased pipeline
  • No breaking change: The commands still work identically — they just don't auto-fire the next one

Test plan

  • Run /speckit.specify <issue> — should complete and stop (no auto-chain to plan)
  • Run /speckit.plan — should complete and stop (no auto-chain to tasks)
  • Run /speckit.tasks — should complete and stop (no auto-chain to implement)
  • Run /speckit.implement — should complete and stop (no auto-chain to analyze)
  • Verify each phase still produces correct artifacts (spec.md, plan.md, tasks.md)

🤖 Generated with Claude Code

Each speckit phase (specify, plan, tasks, implement) previously had
`handoffs` with `send: true`, causing the entire pipeline to fire as
one unstoppable chain. This creates critical issues in automated/headless
environments:

- Session contamination when phases inherit stale context from prior runs
- Zombie processes from auto-chained phases that survive process kills
- Wrong-issue execution when environment is reused across issues
- Loss of orchestrator control between phases (no verify step possible)

Fix: remove all handoff frontmatter so each phase completes its work,
reports what it did, and stops. The caller decides when to advance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant