Skip to content

Stop retaining a copy of user text during history checks - #6086

Closed
markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
remove-provider-history-text-receipt
Closed

markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
remove-provider-history-text-receipt

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Why

Each history cursor has been keeping a second copy of up to 1 MiB of user text just to speed up later checks. This PR has been removing that copy while keeping the same byte limit and prefix hashes.

Summary

Repeat reads of the same long message have been trading speed for less retained text. For 256 KiB of text, check time has been rising from 31 to 497 µs in a local Rust probe. For a different message of the same size, time has been staying near 0.49 ms with or without the cache. These numbers have been measuring local history checks, not the time to run a turn.

Test plan

Both paths have been giving the same byte counts, hashes and errors in 83 cases, with a separate check over 8 MiB. The probe has been using the real budget and digest code with reduced message types. A fresh replay of all 112 patches has been matching the new tree, and all 51 source integrity tests have been passing. Full native tests have still been pending.

Issue number

None.

Checks

  • Tests for exact byte limits, escaped text, and changed message data
  • Full repository checks
  • Passing CI
  • Independent review

@markstuart-oai
markstuart-oai marked this pull request as ready for review November 19, 2026 02:23
@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 19, 2026 02:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:24:40.662502Z f94bd74 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-19T02:25:42.384345Z f94bd74 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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