v7.78.8
/swarm finalize git detection and subprocess safety fix
What changed
checkpoint.tssubprocess safety — The samegitExecfix was applied tosrc/tools/checkpoint.ts(now usesstdio: ['ignore','pipe','pipe'],windowsHide: true, and checksresult.errorbeforeresult.status). It also now passes an explicitcwdto git subprocesses instead of relying on inheritedprocess.cwd. Thesrc/git/branch.tsgitExecalready had this hardening on main.- Help text correction —
src/commands/registry.ts,docs/commands.md, andREADME.mdwere updated./swarm finalizeno longer claims "safe git ff-only to main"; it now accurately describes the destructivegit reset --hard/git clean -fdalignment behavior with a cautious fallback.
Why
The checkpoint.ts cwd fix removes reliance on inherited process.cwd, which is fragile in plugin-hosted contexts where the host process cwd may not be the project root. saveCheckpointRecord was calling isGitRepo() and getCurrentSha() without a directory argument, so it would resolve to the wrong path in plugin-hosted contexts.
The help-text correction prevents users from being misled about finalize's behavior. Finalize aligns the working tree with the approved plan using destructive git commands; describing it as a "safe ff-only merge" was inaccurate and could cause data loss.
Migration steps
None. The fix is transparent to users. If you have scripts or documentation that assumed /swarm finalize performs a safe ff-only merge, update them to reflect the actual destructive cleanup behavior.
Known caveats
/swarm finalizestill performs destructive cleanup (git reset --hardandgit clean -fd) to align the working tree with the approved plan. Ensure uncommitted work is stashed or committed before running finalize.- The subprocess fix does not change the finalize git flow itself; it only corrects repository detection and error reporting.
- On Windows,
windowsHide: truesuppresses the console window that may otherwise flash when git subprocesses are spawned from a GUI/TUI host.
7.78.8 (2026-06-17)
Bug Fixes
This PR was generated with Release Please. See documentation.