Skip to content

codex: route thread/read persistence through thread store#18352

Merged
wiltzius-openai merged 3 commits intomainfrom
wiltzius/codex/thread-read-store-migration
Apr 17, 2026
Merged

codex: route thread/read persistence through thread store#18352
wiltzius-openai merged 3 commits intomainfrom
wiltzius/codex/thread-read-store-migration

Conversation

@wiltzius-openai
Copy link
Copy Markdown
Contributor

@wiltzius-openai wiltzius-openai commented Apr 17, 2026

Summary

  • replace the thread/read persisted-load helper with ThreadStore::read_thread
  • move SQLite/rollout summary, name, fork metadata, and history loading for persisted reads into LocalThreadStore
  • leave getConversationSummary unchanged for a later PR

Context

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 287445efa4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/thread-store/src/local/read_thread.rs Outdated
Comment thread codex-rs/thread-store/src/local/read_thread.rs Outdated
Comment thread codex-rs/thread-store/src/local/read_thread.rs Outdated
Comment on lines 9257 to +9258

fn thread_from_stored_thread(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we decided to go with 2 types, let's do From<StoredThread> for Thread

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the direction, but a literal impl From<StoredThread> for Thread cannot live in codex-app-server: From is a std trait and both Thread (codex-app-server-protocol) and StoredThread (codex-thread-store) are foreign types to this crate, so the orphan rules reject it. Putting the impl in either defining crate would force a dependency between the protocol and persistence crates that we have been trying to avoid. This helper is intentionally the app-server-local adapter boundary; once it has a second caller, I think the better cleanup is to move it into a small private thread-view module rather than making the protocol or store crate depend on the other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol sorry @aibrahim-oai I had the pr babysitter skill running and codex wrote this itself to respond to comments (I just wanted it to retry the failing CI build)

...but fwiw I think its true

@wiltzius-openai wiltzius-openai merged commit fad3d0f into main Apr 17, 2026
35 of 36 checks passed
@wiltzius-openai wiltzius-openai deleted the wiltzius/codex/thread-read-store-migration branch April 17, 2026 17:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants