Skip to content

[CI mirror] fix(coding-agent): revive archived sessions on prompt - #1

Closed
junhoyeo wants to merge 1 commit into
mainfrom
fix/revive-archived-session-on-prompt
Closed

[CI mirror] fix(coding-agent): revive archived sessions on prompt#1
junhoyeo wants to merge 1 commit into
mainfrom
fix/revive-archived-session-on-prompt

Conversation

@junhoyeo

@junhoyeo junhoyeo commented Aug 9, 2026

Copy link
Copy Markdown
Owner

CI mirror for upstream PR PrimeIntellect-ai#1039 (fork PRs need workflow approval upstream; this runs the identical ci.yml here). Not for merging into the fork's main.

…-ending

A window attached to a session the daemon later archives (idle eviction,
RLM subagent archived after its final answer, parent deleting a finished
child) stayed open but every keystroke failed with 'Unknown active
session' forever, even though the transcript is saved and resumable.

DaemonAgentConnection.prompt/promptAndWait now catch the unknown-session
error, resume the saved session file via the daemon's idempotent create
command, re-attach, emit session_resynced, and retry the prompt once.

The revived binding is never published early: attach now takes an
explicit target (attachSessionBinding) and the connection keeps its
previous binding until the attach succeeds, so no concurrently started
prompt can target a session this client has not attached to, and there
is no rollback that could stomp a newer binding installed by a
concurrent transition. A revival superseded by a session switch,
reconnect, or update recovery fails, leaves the newer binding
untouched, and releases the revived session's attachment (plus
complete_owned_session for owned lifecycles, also on disposal
mid-revival). attach() rejects a superseded response instead of
rebinding backwards. The unknown-session match is exact and bound to
the id the prompt targeted, and a concurrent prompt joins only a
sibling revival of that same session. Reviving a killed session on a
later prompt is deliberate: the agents view reply flow already resumes
killed sessions, and a revived transcript is strictly recoverable.
@junhoyeo

junhoyeo commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Fork has no registered workflows; running the CI matrix locally instead.

@junhoyeo junhoyeo closed this Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant