Skip to content

Add thread metadata store API#21873

Open
wiltzius-openai wants to merge 1 commit intomainfrom
wiltzius/codex/thread-metadata-store-api
Open

Add thread metadata store API#21873
wiltzius-openai wants to merge 1 commit intomainfrom
wiltzius/codex/thread-metadata-store-api

Conversation

@wiltzius-openai
Copy link
Copy Markdown
Contributor

@wiltzius-openai wiltzius-openai commented May 9, 2026

This does not change behavior yet. It adds new API substrate for moving thread metadata to be explicitly handled by the ThreadStore rather than implicitly handled by the RolloutRecorder. It large duplicates logic that lives in the rollout recorder today. #21874 removes that logic from the rollout recorder and starts calling these new methods.

Summary

  • add explicit ThreadStore::apply_thread_metadata API and metadata update params
  • add private ThreadMetadataHandler with focused tests for initial metadata, resume, user message, and metadata patches
  • implement LocalThreadStore metadata application for SQLite plus name-index fallback
  • document LiveThread / ThreadStore / RolloutRecorder responsibilities

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-metadata-store-api branch from f8dfb0b to 8a074e0 Compare May 9, 2026 03:25
@wiltzius-openai wiltzius-openai marked this pull request as ready for review May 9, 2026 04:46
@wiltzius-openai wiltzius-openai requested a review from a team as a code owner May 9, 2026 04:46
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: 8a074e002c

ℹ️ 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 on lines +12 to +13
#[allow(dead_code)]
mod thread_metadata_handler;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Wire the metadata handler into LiveThread

This module is added under #[allow(dead_code)], so the new ThreadMetadataHandler is never owned by LiveThread; LiveThread::append_items still calls only append_items and never apply_thread_metadata. Stores that rely on the new explicit metadata API won't receive previews, token counts, memory mode, or git updates despite the README documenting that flow.

Useful? React with 👍 / 👎.

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.

2 participants