Repository navigation
Save the repositories folder alone; never leave an empty agent storage lock (0.3.17) - #29
Merged
Merged
Conversation
So Claude Desktop, the Codex plugin and the mainsequence CLI can keep one repositories
folder: the CLI's `mainsequence_path` in its config.json.
- `writeWorkspacePreferences({ backend?, baseDir?, commandCenterUrl? })` saves only the
fields given and keeps every other setting. A call with none is refused. The Codex
plugin still passes all three, so it behaves as before.
- `readWorkspacePreferences` also returns `baseDirSaved`: true when the folder comes
from the shared configuration rather than the `<home>/mainsequence` default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI failed once on this branch in `a process killed after send leaves an uncertain record` (STORE_ERROR after the 3-second lock wait); the same commit passed in the other run. The cause is in the store, not the test: the lock was created empty and its owner written after, and `wait` takes it every 250 ms while a send runs. A process killed between the two left an empty lock, which by design is never reclaimed, so every later call failed with "Saved agent requests could not be read safely" until the file was removed by hand. - The owner record is written to a private file first and linked into place, which fails while another lock exists, so the lock never exists without its owner. A lock left with that second name by an owner killed between linking and cleaning up is reclaimed with the dead owner's lock, as before. - An empty lock (left by an older version) is removed once it is ten seconds old, under a durable claim; a new one is still waited for, since its owner may be writing. Tests: a dead owner's lock with its second name is reclaimed; a fresh empty lock is waited for and refused, a stale one removed. The killed-process test passed 30 times in a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Repositories folder. Claude Desktop keeps its own copy of the repositories folder. Codex and the
mainsequenceCLI sharemainsequence_pathin the CLI'sconfig.json. Changing the folder in one tool doesn't reach the others. To unify them, Claude needs to save just the folder into the shared file and to know whether the file already names one.Agent storage lock. CI failed once on this branch in
a process killed after send leaves an uncertain record, with STORE_ERROR after the store's 3-second lock wait. The same commit passed in the other run. The cause is in the store:waittakes the lock every 250 ms while a send runs.What changes
writeWorkspacePreferences({ backend?, baseDir?, commandCenterUrl? })saves only the fields it is given and keeps every other setting. A call with none is refused. The Codex plugin passes all three, so its behaviour is unchanged.readWorkspacePreferencesalso returnsbaseDirSaved: true when the folder comes from the shared configuration rather than the<home>/mainsequencedefault.Verification
npm run release:checkpasses: 189 tests, plus the docs and package checks. New tests:{ baseDir }is saved alone,baseDirSavedis reported both ways, and an empty call is refused.The killed-process test passed 30 times in a row.
🤖 Generated with Claude Code