fix(prime-agent): adopt 0.7.3 and explain a rejected model selection - #48
Merged
Conversation
Prime Agent 0.7.3 needs no adapter change: the public DaemonAgentConnection and daemon protocol type surfaces are byte-identical to 0.7.2, protocol 7 and schema 16 are unchanged, and the context-tree and daemon-socket code behind our two blocked parity entries is unchanged, so every recorded deferral still holds. Verified with the Prime suite and the opt-in real-daemon test against the installed 0.7.3 binary. Two things did move. 0.7.3 regenerated its model catalog and dropped ids such as cerebras/zai-glm-4.7, so a thread pinned to a removed model failed its next turn with "The daemon model switch failed", which does not tell the user what to do. Name the likely cause and the fix instead, without copying Prime's native error text across the adapter boundary. 0.7.3 also moved the supervisor ownership registry from $TMPDIR to ~/.prime/supervisor-owners, so Pylon writes ownership records there even when a provider instance sets its own agent home. That is safe for us because ownership conflicts key on socket path and worker descriptor directory, both unique per provider instance, and we deliberately strip every PRIME_AGENT_INTERNAL_* variable rather than use Prime's internal override. Record the behavior and correct the parity ledger's claim that the real-daemon test never writes to the source Prime home. Model: Claude Opus 5 in Pylon (Claude Code harness)
Thread transfer impact
This comment will update automatically after the next completed run. |
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.
Problem
Prime Agent shipped 0.7.3 and we were documented and verified against 0.7.2. Two behavior changes reach users:
cerebras/zai-glm-4.7,claude-opus-4,claude-opus-4-1, severalclaude-3*). A thread pinned to a removed model fails its next turn withThe daemon model switch failed., which does not tell the user what happened or what to do.$TMPDIRto~/.prime/supervisor-owners(macOS cleanup was deleting long-running supervisors' authority records). Pylon now writes ownership records there even when a provider instance sets its own agent home, which makes the parity ledger's claim that the real-daemon test "never writes to the source Prime home" untrue.How it was fixed
No adapter change was needed for the bump. I diffed the published 0.7.2 and 0.7.3 tarballs:
daemon-agent-connection.d.ts,daemon-protocol.d.ts, andindex.d.tsare byte-identical, protocol 7 / schema 16 / schema id are unchanged, andcontext-tree.jsanddaemon-socket.js— the code behind our two blocked parity entries (getContextTree, Windows daemon mode) — are unchanged too, so every recorded deferral still holds. 0.7.3's rewritten RLM spawn ledger is private to daemon mode, and its new authenticated host-request contracts belong to the Python kernel surface, not the extension API our approval gate uses. The one public removal in the release,listSavedSessionSiblings/siblings(), is unused here.Model rejection now names the likely cause and the action, without copying Prime's native error text across the adapter boundary. Covered by a focused test that also asserts the native path in the rejection does not leak.
Ownership registry: keep the upstream behavior, document it. It is safe for us because
ownerConflictskeys on socket path and worker descriptor directory — Pylon derives a unique socket per(state directory, provider instance)and the descriptor directory hashes that socket, so a Pylon daemon never claims ownership over a user's interactiveprime-agentdaemon even when both share the default~/.prime/agenthome. Prime exposes an internal env override for the location; we do not use it, becausesanitizePrimeAgentDaemonEnvironmentstrips everyPRIME_AGENT_INTERNAL_*variable by design and that policy is explicitly tested, including a forward-compatibility case. The ledger's test-isolation claim is corrected rather than papered over.Verification
vp test run apps/server/src/provider/prime/— 243 passed, 1 skipped (was 242 + 1; the new test is the delta)vp run -F t3 typecheck— 0 errors, nothing reported in the touched filesvp linton both touched source files — cleanNo UI changes, so no before/after images.
Model: Claude Opus 5 in Pylon (Claude Code harness)
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.