Skip to content

fix(workspace-jj): create workspaces outside repo to prevent auto-snapshot leak#50

Merged
muloka merged 1 commit into
mainfrom
fan-flames-calibration
Apr 3, 2026
Merged

fix(workspace-jj): create workspaces outside repo to prevent auto-snapshot leak#50
muloka merged 1 commit into
mainfrom
fan-flames-calibration

Conversation

@muloka

@muloka muloka commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause fix: Workspaces were created inside the repo at .claude/workspaces/. jj's default workspace auto-snapshots all files under the repo root, so when a Wave 2 agent edited files inside a workspace directory, jj attributed the changes to the default workspace's @ instead of the agent's workspace.
  • Fix: Create workspaces in /tmp/jj-workspaces/<project>/<name>/ instead — outside jj's auto-snapshot scope.
  • Updated both workspace-jj and project-setup-jj copies of jj-workspace-create.sh
  • Also includes v2 calibration: tiered spec review, parallelism threshold warning, workspace integrity check, JJ_EDITOR=true for squash

Bug report

Fan-flames dispatched 4 agents across 2 waves. Wave 1 agents worked correctly.
Wave 2 agent's edits (900+ lines) landed in default workspace @ instead of
its workspace. The agent workspace showed 0 files changed.

Root cause: .claude/workspaces/ is inside the repo. jj auto-snapshots all
files under repo root, attributing workspace edits to default @.

Test plan

  • Verify jj-workspace-create.sh uses /tmp/jj-workspaces/ path in both plugins
  • Verify no references to .claude/workspaces/ remain in live code (historical docs ok)
  • Run /fan-flames UAT with multi-wave plan to confirm isolation holds

🤖 Generated with Claude Code

…pshot leak

Root cause: .claude/workspaces/ was inside the repo root. jj's default workspace
auto-snapshots ALL files under the repo, including workspace directories. When a
Wave 2 agent edited files inside .claude/workspaces/agent-XXXX/, jj attributed
the changes to the default workspace's @ instead of the agent workspace's @.

Fix: Create workspaces in /tmp/jj-workspaces/<project>/<name>/ instead.
This keeps workspace directories outside jj's auto-snapshot scope.

Also includes v2 calibration:
- Tiered spec review (trivial tasks verified inline, skip reviewer agent)
- Parallelism threshold warning (<40% parallelizable suggests single-agent)
- Workspace integrity check (Pattern C detection)
- JJ_EDITOR=true for squash commands
@muloka muloka merged commit bd38371 into main Apr 3, 2026
2 checks passed
@muloka muloka deleted the fan-flames-calibration branch April 3, 2026 19:17
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