feat(daemon): recover owned detached sessions - #43
Merged
Conversation
rynfar
marked this pull request as ready for review
September 1, 2026 17:26
rynfar
force-pushed
the
feat/recoverable-owned-session-adoption
branch
from
September 1, 2026 18:22
3cdc268 to
a3dd5ce
Compare
rynfar
force-pushed
the
feat/recoverable-owned-session-adoption
branch
from
September 1, 2026 18:46
a3dd5ce to
b6ca021
Compare
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
A client-owned Prime session could not be safely recovered after its owning client detached or the daemon supervisor restarted. The SDK had no authority-preserving way to recover the exact worker, replay its retained state, rotate ownership, and prove cleanup.
Implementation
Recoverable owned session adoption is unavailable. Do not expose recovery handles, environment values, paths, tokens, process identities, sockets, or hashes on public surfaces.{pid, processStartId}immediately before termination signals. Sanitize daemon worker bootstrap variables before runtime startup.Verification
npm run check— passed; 964 files checked, no fixes or warnings.npm run build— passed for TUI, AI, agent core, and coding agent.daemon-supervisor-process.test.tswith an isolatedHOMEand clearedPRIME_AGENT_INTERNAL_*,RLM_*,PRIME_AGENT_CODING_AGENT_DIR,FORCE_COLOR, and live-worker variables — 20 passed, 9 platform skips.git diff --check— passed.Model:
openai-codex/gpt-5.6-solHarness: Prime Agent RLM subagent
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.