os-sdlc SubagentStart hook records the dispatch in the session cwd's pipeline.db, not in the implementation's worktree #1653
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1653
Loading…
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?
Problem
The os-sdlc SubagentStart hook finds
.sdlc/pipeline.dbfrom the session cwd, not from the worktree of the implementation. When the orchestrator opens the implementation in another worktree, the hook creates a second, emptypipeline.dbin the session cwd without a warning, and it records the dispatch there. The agent gets no dispatch ID,os-sdlc-subagent-stoprefuses its handoff ("no dispatch 1"), andos-sdlc-nextin the real worktree returnsawait_completionforever.Reproduce
os-sdlc-implementation-open <session> <ticket> poodr-ticket-implementationfrom worktree B. It creates implementation 1 in B's.sdlc/pipeline.db.change-auditorwith the Agent tool.A/.sdlc/pipeline.dband records the dispatch there. The agent's submit fails with "no dispatch 1".Seen on 2026-11-09 in llm-stack #26. Recovery: EnterWorktree into B, then dispatch again.
Why it happens
/os-sdlc:implementSetup tells the orchestrator to run/os-git:worktree start ticket-<n>, which starts frommain. When a ticket must build on an unmerged branch, the orchestrator must use another worktree, and nothing in the skill moves the session cwd there.Candidate fixes (not decided)
implementation-openrecords the project root, and the hook finds the db through the session ID.implementation-openrefuses when its cwd differs from the session cwd, and names the fix (EnterWorktree).implementation-open.pipeline.dbwithout a warning.Discoverer: ruby-gems/llm-stack, session a0ddd084-33f2-4676-aac9-c6373a206c4c, 2026-11-09. Implementing llm-stack #26 on a branch based on an unmerged branch lost the first dispatch to a second pipeline.db. Ticket-skeptic: VERDICT CREATE; root candidate none found (searched SubagentStart, pipeline.db, implementation-open, no dispatch, subagent-stop, session cwd, worktree).