Repository navigation
fix: Opening the same project from several places at once no longer fails - #737
Merged
Merged
Conversation
… failing `ch ws create --project <path>` arriving while app:ready's startup open of the same project was in flight failed with "Could not open project": the per-key idempotency rule blocked the nested project:open, a blocked dispatch resolves to undefined, and workspace:open reads that as failure. The API server answers before app:ready runs, and a path never matches an open project by name, so any two concurrent opens of one path could collide. - idempotency-module: a per-key rule with `wait` holds a duplicate until the reset event releases the key, then hands the key straight to it (FIFO). project:open uses it; the other rules still drop duplicates. - project:open: every exit now emits project:opened or project:open-failed. A cancelled prepare (declining git init) and a throwing prepare hook left the key held, silently dropping every later open of that path. - ch progress: read project:open-failed's `reason` (it read a nonexistent `error`, so always printed "unknown error"); say nothing for already-open and report a cancel as one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stefanhoelzl
enabled auto-merge (rebase)
October 2, 2026 18:06
auto-merge was automatically disabled
October 2, 2026 18:22
Pull Request is not mergeable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ch ws create --project <path>issued while app:ready's startupproject:openof the same project was in flight failed withCould not open project "<path>"(seen as a 1-in-10 flake ofe2e/agent-turn.e2e.ts). The API server answers before app:ready runs, and a path never matches an open project by name, so any two concurrent opens of one path could collide — not only at startup, and independent ofexperimental.concurrent-hooks.project:openblocked the duplicate; a blocked dispatch resolves toundefined, whichworkspace:open(andch project open) read as failure.waitoption — a duplicate is held until the reset event releases the key, which is handed straight to it (FIFO, one at a time).project:openuses it; every other rule still drops duplicates.project:openedorproject:open-failed. A cancelled prepare (declining git init) and a throwing prepare hook used to leave the key held, silently dropping every later open of that path.project:open-failedfrom itsreasonfield (it read a nonexistenterror, so always printed "unknown error"); say nothing foralready-open, report a cancel as a cancel.project:open-failed, progress rendering. Docs:docs/INTENTS.md,CLAUDE.md.🤖 Generated with Claude Code