From 1e33c5835b91af3448e5cb0ca134b7e5cba2859e Mon Sep 17 00:00:00 2001 From: muloka <256166+muloka@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:09:54 -0400 Subject: [PATCH] fix(workspace-jj): fan-flames recovery path for missing change IDs When a subagent crashes before reporting its change ID, recover by searching jj log for changes matching the task description. --- plugins/workspace-jj/skills/fan-flames.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/workspace-jj/skills/fan-flames.md b/plugins/workspace-jj/skills/fan-flames.md index e1a5d4f..3b5f766 100644 --- a/plugins/workspace-jj/skills/fan-flames.md +++ b/plugins/workspace-jj/skills/fan-flames.md @@ -112,6 +112,16 @@ As subagents return, classify each result: Track which tasks succeeded and which failed. **Capture the change ID from each subagent's report** — these are needed for fan-in. +### Recovery: Missing Change IDs + +If a subagent crashes or times out before reporting its change ID, the change still exists in jj's DAG — it's just not referenced. Recover it by searching for the task description: + +```bash +jj log -r 'description("Task N: ")' --no-graph -T 'change_id' +``` + +If multiple matches, use the most recent. If no matches, the subagent likely never created any changes — treat as BLOCKED. + ## Phase 4: FAN IN 🔥 — Reunify Changes **Why change IDs, not workspace revsets:** Each subagent reports its change ID before returning. We use these IDs for squash instead of `workspace-@` revsets because Claude Code may fire the WorktreeRemove hook (which calls `jj workspace forget`) when a subagent finishes, before the orchestrator runs fan-in. Change IDs are stable regardless of workspace lifecycle.