feat(prime): isolate native instance ownership - #256
Merged
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
rynfar
force-pushed
the
feat/prime-native-multiple-instances
branch
from
September 2, 2026 22:40
3dd920c to
feacfc2
Compare
This was referenced Sep 2, 2026
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.
Prime instance generations could share mutable daemon state, and restart adoption or teardown could proceed without exact current ownership proof. This made concurrent environments vulnerable to cross-instance routing, stale-generation publication, and uncertain cleanup.
This change isolates every native Prime runtime context and binds it to its instance home, socket, token, generation, MCP ownership, status cache, and usage cache. It adds current post-attach capability proof, durable ownership receipts with quarantine and exact recovery rotation, generation fences, compare-and-set settings mutation, and identity-bound teardown. ACP remains an explicit degraded N=1 fallback on POSIX/WSL2. Native Windows fails before Prime process, import, probe, download, or install I/O. The public capability stays disabled for this release with
supportsMultipleInstances: falseand one-account UI guidance.The safety delta from
2f2a89165..e66023641is intentionally one commit. Applying the cumulative delta was the only safe way to preserve the newerpylonperformance/coalescing work and merged #250/#255 without replaying recovery commits or merge history.Verification:
a3dd5ce633fef161d30ded9474f75a609a9e7a2areal process suite: 20 passed, 9 expected skips.release:smokepassed.ws.tsunused-import warning. Changed-file format andgit diff --checkpassed.Full-server note: two 4,079-test runs each reached 4,063 passes with one unrelated parallel-only failure. The first exposed and led to a fixed cwd-independent ownership helper path. The second was the upstream server coalescing seam receiving another test server's HTML on a reused ephemeral port; its focused rerun passed. The required target shards are green.
Screenshots were not captured because this task explicitly excluded browser use. The visible change keeps multiple Prime accounts disabled and is covered by the server-rendered settings tests.
Base:
51ce1c42174fc7d2e029499d650962a5837412c1Built with GPT-5.6 Sol using Prime Agent.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.