Skip to content

Harden multi-instance startup policy - #199

Merged
Juliusolsson05 merged 3 commits into
mainfrom
investigate/147-multi-instance-policy-v2
May 18, 2026
Merged

Juliusolsson05 merged 3 commits into
mainfrom
investigate/147-multi-instance-policy-v2

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

  • Documents issue Audit and harden behavior with multiple Agent Code instances open #147 investigation and chooses a single-primary-process policy.
  • Adds a shared-state advisory process lock under ~/.config/agent-code to catch dev/prod or app-identity splits that bypass Electron's single-instance lock.
  • Hardens setup.json and worktree-activity-index.json writes with unique temp+rename paths, and adds a focused process-lock test.

Tests

  • npm run test:process-lock
  • npm run test:worktree-activity
  • npm run test:review-fixes

Checks that did not pass

  • npx tsc --noEmit -p tsconfig.node.json still fails on existing package alias/type issues around agent-voice-dictation, claude-code-headless, codex-headless, and pidusage.
  • npm run build fails before app compilation because packages/claude-code-headless/src/proxy/mitmAddon.py is missing in this checkout; the existing Vite resource-copy plugin expects that file.

Notes

This PR intentionally does not attempt true multi-instance storage support. The current architecture stores whole workspace snapshots and process-local main registries, so the smallest defensible policy is one primary process. Future multi-window support should add windows to the primary process rather than launching multiple mains.

Closes #147

@Juliusolsson05
Juliusolsson05 merged commit 1606e5d into main May 18, 2026
@Juliusolsson05
Juliusolsson05 deleted the investigate/147-multi-instance-policy-v2 branch July 7, 2026 21:56
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.

Audit and harden behavior with multiple Agent Code instances open

1 participant