Skip to content

Conversation

@nsluss
Copy link

@nsluss nsluss commented Jan 15, 2026

Summary

This PR addresses three related issues with VM orchestration and subprocess management:

Issue #37 - Golden image outdated

  • Added scripts/create-golden-image.sh script to create new golden images
  • Script installs Bun, Node.js, Claude Code, and vers-agent
  • Configures systemd service and creates Vers commit
  • After running, outputs the new VERS_GOLDEN_COMMIT_ID to use

Issue #39 - vm-sync fails when golden commit is not a git ancestor

  • vm-sync now detects when the base commit is not a valid git commit
  • Automatically falls back to full sync mode (tarball upload) when git bundle creation fails
  • Added --full flag to force full sync mode
  • Updated vm-sync-all with the same logic

Issue #40 - Claude subprocess restart is flaky

  • Added cleanupOrphanedProcesses() function to kill orphaned claude-code-acp processes
  • Cleanup is called before starting new agent subprocess
  • Detects orphaned processes by checking if their parent process is dead

Test plan

  • Test vm-sync with invalid base commit - should fall back to full sync
  • Test vm-sync --full - should use tarball upload
  • Test vm-sync with valid git commit - should use bundle mode
  • Run create-golden-image.sh to create a new golden image
  • Verify orphan cleanup on startup by killing vers-agent and checking for leftover claude processes

Related Issues

Closes #37
Closes #39
Closes #40

🤖 Generated with Claude Code

Issue #37 - Golden image outdated:
- Add create-golden-image.sh script to create new golden images
- Script installs Bun, Node.js, Claude Code, and vers-agent
- Configures systemd service and creates Vers commit

Issue #39 - vm-sync fails when golden commit is not a git ancestor:
- Detect when base commit is not a valid git commit
- Detect when base commit is not an ancestor of HEAD
- Automatically fall back to full sync mode (tarball upload)
- Add --full flag to force full sync
- Update vm-sync-all with same logic
- Update help text

Issue #40 - Claude subprocess restart is flaky:
- Add cleanupOrphanedProcesses() to kill orphaned claude-code-acp processes
- Call cleanup before starting new agent subprocess
- Detect orphaned processes by checking if parent is dead

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants