os-sdlc SubagentStart hook records the dispatch in the session cwd's pipeline.db, not in the implementation's worktree #1653

Open
opened 2026-11-09 21:56:22 +00:00 by jared · 0 comments
Owner

Problem

The os-sdlc SubagentStart hook finds .sdlc/pipeline.db from the session cwd, not from the worktree of the implementation. When the orchestrator opens the implementation in another worktree, the hook creates a second, empty pipeline.db in the session cwd without a warning, and it records the dispatch there. The agent gets no dispatch ID, os-sdlc-subagent-stop refuses its handoff ("no dispatch 1"), and os-sdlc-next in the real worktree returns await_completion forever.

Reproduce

  1. Start a session in worktree A.
  2. Run os-sdlc-implementation-open <session> <ticket> poodr-ticket-implementation from worktree B. It creates implementation 1 in B's .sdlc/pipeline.db.
  3. Dispatch the named change-auditor with the Agent tool.
  4. The hook creates A/.sdlc/pipeline.db and 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:implement Setup tells the orchestrator to run /os-git:worktree start ticket-<n>, which starts from main. 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-open records the project root, and the hook finds the db through the session ID.
  • implementation-open refuses when its cwd differs from the session cwd, and names the fix (EnterWorktree).
  • The implement skill tells the orchestrator to EnterWorktree before implementation-open.
  • In all cases, the hook must not create a new pipeline.db without 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).

## Problem The os-sdlc SubagentStart hook finds `.sdlc/pipeline.db` from the session cwd, not from the worktree of the implementation. When the orchestrator opens the implementation in another worktree, the hook creates a second, empty `pipeline.db` in the session cwd without a warning, and it records the dispatch there. The agent gets no dispatch ID, `os-sdlc-subagent-stop` refuses its handoff ("no dispatch 1"), and `os-sdlc-next` in the real worktree returns `await_completion` forever. ## Reproduce 1. Start a session in worktree A. 2. Run `os-sdlc-implementation-open <session> <ticket> poodr-ticket-implementation` from worktree B. It creates implementation 1 in B's `.sdlc/pipeline.db`. 3. Dispatch the named `change-auditor` with the Agent tool. 4. The hook creates `A/.sdlc/pipeline.db` and 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:implement` Setup tells the orchestrator to run `/os-git:worktree start ticket-<n>`, which starts from `main`. 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-open` records the project root, and the hook finds the db through the session ID. - `implementation-open` refuses when its cwd differs from the session cwd, and names the fix (EnterWorktree). - The implement skill tells the orchestrator to EnterWorktree before `implementation-open`. - In all cases, the hook must not create a new `pipeline.db` without 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).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1653
No description provided.