Repository navigation
feat: add read-only session history replay via _session/read - #815
Open
yaobii-lab wants to merge 1 commit into
Open
yaobii-lab wants to merge 1 commit into
yaobii-lab wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
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.
What
session/loadandsession/resumeattach to a thread throughthread/resume, which acquires Codex's exclusive rollout writer lock and starts configured MCP servers. When another client (such as the Codex desktop app, CLI, or another IDE) holds the session open,thread/resumefails withthread_active_writer, leaving multi-client workspaces unable to preview the conversation history over ACP.This adds
_session/read, a pre-standard extension advertised on both ACP v1 and v2 as_meta.sessionRead: { "supported": true }in theinitializeresponse:thread/readandthreadItemEntryPages, orthreadReadWithHistoryfor legacy threads) without callingthread/resume, acquiring the writer lock, starting MCP servers, or installing an openSessionState.streamThreadHistoryso user messages, assistant messages, file citations, reasoning, tool calls, plans, compactions, session title, cursors (forkonly), and recorded subagent histories matchsession/loadandsession/resume(includingreplay_completeframing on ACP v2).-32600,data.reason: "session_already_open") to prevent interleaved updates, and clears transient delivery state on completion so a subsequentsession/loadorsession/resumestarts cleanly.Wire contract:
docs/session-read.md.Validation
npm run typechecknpm test(2,818 passed, includingsession-read.test.tsacross ACP v1/v2, active-writer threads, post-readsession/load, parameter/not-found errors, cancellation, and scenario baseline checks)npm run buildand smoke-tested_session/readagainst a live local Codex App Server thread