You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Audit and harden behavior with multiple Agent Code instances open #147
Agent Code has mainly been used/tested with one app instance open. We need to verify what happens when multiple Agent Code instances are running at the same time against the same app state, workspace files, session files, debug logs, proxy logs, and indexes.
I suspect this may currently break or corrupt state.
Questions
What happens if 2-4 Agent Code instances are open?
Do they race on workspace persistence?
Do they race on session indexes or restore state?
Do Claude/Codex transcript tails behave correctly?
Do debug/feed/proxy logs get corrupted or interleaved?
Does the worktree activity index handle concurrent refresh/write?
Should we support multi-instance, or enforce single-instance?
Desired Outcome
Choose and implement a clear policy:
allow multiple instances safely, or
enforce a single-instance app lock, or
allow multiple windows through one primary process.
Tasks
Audit all app-state/userData write paths.
Identify shared JSON/log/index files written by the app.
Test multiple simultaneous app instances.
Add file locking, per-instance namespacing, atomic writes, or single-instance enforcement.
Add thick WHY comments near the app bootstrap/storage policy.
Acceptance Criteria
Running multiple instances is either safe or intentionally blocked.
Shared state files cannot be corrupted by concurrent app processes.
Activity