Repository navigation
Conversation
Air can search stored Codex messages before it opens a session. The negotiated extension serves revisions and bounded snapshots through the existing batch API. The app-server reads old and archived history, including compressed rollouts. Compaction markers without summary text keep available matches and mark the snapshot incomplete. Tests: - TypeScript checks and 107 unit and wire tests passed. - The real app-server test passed for old, archived, and compressed history. - The bundle build and independent ACP v1 and v2 checks passed. Evidence: - Equal-size edits with a restored modification time change the revision. - Stored snapshots exclude tools and reasoning. Left out: - Publishing and a first released version remain separate operations.
slapoguzov
reviewed
Nov 27, 2026
slapoguzov
left a comment
Collaborator
There was a problem hiding this comment.
In a wire test on v1 and v2, switching the selected rollout during a read returned the new text with the old revision. Could we recheck which rollout the session points to before returning, and cover this case with a regression test?
The 4 MiB limit counts returned text. If most pages contain only tool calls, what bounds the number of pages read, and can cancelling the search stop an in-flight read? Could a scan that hits its limit return truncated: true?
slapoguzov
requested changes
Nov 27, 2026
osdm
force-pushed
the
air/session-search-text
branch
from
November 28, 2026 02:50
186a790 to
5e4c3e6
Compare
osdm
force-pushed
the
air/session-search-text
branch
from
November 28, 2026 03:13
5e4c3e6 to
2f9b18d
Compare
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.
Air can list older Codex sessions, but metadata alone cannot find matches in their messages. Add negotiated
sessionTranscriptTextsupport to_session/batch_getfor ACP v1 and v2, so clients can request a cheap revision or a bounded text snapshot before opening a session.The extension requires one session ID and its absolute cwd. Read user and assistant text through app-server item pages, with a bounded full-history read for legacy sessions. Support archived sessions and compressed rollouts, and exclude tools, reasoning and non-text input. Ordinary metadata requests keep their existing response shape.
Successful projections use fixed limits: 4 MiB of messages and 10,000 raw items, including omitted tools and reasoning. Legacy input is limited to 64 MiB uncompressed. These limits can return
truncated: true; response speed does not choose how much text is cached under a revision.A shared 60-second deadline covers history reading and final verification. Timeout returns
-32603withdata.reason: "transcriptReadTimeout", without a snapshot; clients should retry later with backoff. A source change after the initial file revision returns-32603withdata.reason: "transcriptChanged", allowing an immediate retry. A transcript missing before the initial revision returns no row.Check the source metadata in legacy full-history responses and recheck the selected rollout and file revision before returning. This catches legacy A-to-B-to-A changes without another RPC. Paginated item responses have no rollout identity, so detecting arbitrary A-to-B-to-A changes between checks still requires app-server support; this limitation is documented.
Cancellation promptly stops waiting and further paging. App-server history reads have no cancellation RPC, so an already submitted read can finish in the background. Compaction markers without summary text preserve available messages and mark the projection as truncated.
Measurements
Codex 0.171.0 and Node.js 25.9.0 on macOS arm64 / Apple M4 Max. Eight synthetic cases cover files just below 4/64 MiB, message-heavy and tool-heavy histories, plain and zstd. Each case used a fresh app-server, an initial metadata lookup, one first full-history read and three repeats, followed by one warm adapter snapshot. No model requests were involved.
The largest native read was 116.31 ms; the largest warm adapter snapshot was 133.14 ms. The 60-second hang guard leaves substantial headroom. The OS file cache was not flushed, and the fixture text was repetitive and highly compressible. The first-read measurement represents a fresh app-server, not physical cold-storage I/O; these results are not a latency guarantee for all machines or storage. The legacy tool corpus returned only its seed user message, although its raw tool-call bytes were still read from the file.
Validation
npm run typechecknpm test: 2,836 passed, 39 skipped.src/__tests__/integration/session-batch-get.test.ts(old, archived and compressed history).run-codexsmoke test with real Codex: the turn completed successfully.npm run build