subagent-driven-branch-ref-froze-stranded-commitslisted
Install: claude install-skill wan-huiyan/agent-traffic-control
# Subagent-driven session left commits stranded — branch ref froze while worktree HEAD advanced
## Problem
You ran a long `superpowers:subagent-driven-development` (or similar fresh-
subagent-per-task) session in a worktree. Each subagent did its task, committed
its work, the controlling session ran spec + code-quality review per task, all
green. At the end you pushed the worktree's branch to origin, opened a PR, CI
went green, you squash-merged.
Hours or one session later, somebody runs `pytest` on freshly-pulled main and
gets a `ModuleNotFoundError`, a missing-file assertion, or a `sql_path missing`
error pointing at code that **was definitely committed** during the session.
`git log` in your old worktree still shows all the commits at the top of the
branch. But on main, half of them are gone.
The squash commit on main contains only the early portion of your work —
typically the first N tasks before some specific transition point. Tasks
after that point exist as commits in the worktree (`git log` shows them)
but did not reach origin, did not reach the PR, did not reach the merge.
## Context / Trigger Conditions
Strong signal **after** the merge:
1. `gh pr view <N>` body claims a file count (e.g. "55 files changed") that
doesn't match the actual squash-commit file count
(`git diff-tree --no-commit-id --name-only -r <merge-sha> | wc -l`).
2. A test that passed locally during the session now fails on main because a
file the test depends on isn't there.
3. Recei