Skip to content

Make thread store process-scoped#19474

Merged
wiltzius-openai merged 16 commits into
mainfrom
wiltzius/codex/process-thread-store
May 1, 2026
Merged

Make thread store process-scoped#19474
wiltzius-openai merged 16 commits into
mainfrom
wiltzius/codex/process-thread-store

Conversation

@wiltzius-openai
Copy link
Copy Markdown
Contributor

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

  • Build one app-server process ThreadStore from startup config and share it with ThreadManager and CodexMessageProcessor.
  • Remove per-thread/fork store reconstruction so effective thread config cannot switch the persistence backend.
  • Add params to ThreadStore create/resume for specifying thread metadata, since otherwise the metadata from store creation would be used (incorrectly).
@wiltzius-openai wiltzius-openai marked this pull request as ready for review April 25, 2026 00:54
@wiltzius-openai wiltzius-openai requested a review from a team as a code owner April 25, 2026 00:54
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: 8f6aed7f69

ℹ️ 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/core/src/thread_manager.rs
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

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

let request = proto::CreateThreadRequest {
thread_id: thread_id.to_string(),
forked_from_id: params.forked_from_id.map(|thread_id| thread_id.to_string()),
source: Some(helpers::proto_session_source(&params.source)),
base_instructions_json: helpers::base_instructions_json(&params.base_instructions)?,
dynamic_tools_json: helpers::dynamic_tools_json(&params.dynamic_tools)?,
event_persistence_mode: helpers::proto_event_persistence_mode(
params.event_persistence_mode,
)
.into(),

P2 Badge Forward per-thread metadata in remote create_thread requests

CreateThreadParams now includes metadata (cwd, model_provider, memory_mode), but RemoteThreadStore::create_thread still serializes only the old fields, and the protobuf has no slots for the new data. With experimental_thread_store = remote, newly created threads will persist without the per-thread metadata that local storage now records, so remote-backed thread summaries and memory-mode state diverge from local behavior.


let request = proto::ResumeThreadRequest {
thread_id: thread_id.to_string(),
rollout_path: params
.rollout_path
.map(|path| path.to_string_lossy().into_owned()),
history_json,
has_history,
include_archived: params.include_archived,
event_persistence_mode: helpers::proto_event_persistence_mode(
params.event_persistence_mode,

P2 Badge Pass metadata_defaults through remote resume_thread

This commit added ResumeThreadParams::metadata_defaults specifically to stop resumed legacy threads from falling back to process-wide defaults, but RemoteThreadStore::resume_thread still drops that field. Remote-backed resumes therefore continue reconstructing older threads with the server default provider instead of the thread’s effective provider, so the metadata-fix only works for the local backend.

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

wiltzius-openai added a commit that referenced this pull request Apr 30, 2026
@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/process-thread-store branch from 0c9e6b1 to 20b550d Compare April 30, 2026 20:53
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

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: 20b550dbfc

ℹ️ 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/core/src/agent/control.rs
Comment thread codex-rs/app-server/src/message_processor.rs
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

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: de4d98da1c

ℹ️ 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/app-server/src/codex_message_processor.rs
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

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: 467be306e0

ℹ️ 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/live_writer.rs Outdated
Comment thread codex-rs/thread-store/src/local/read_thread.rs
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

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: f1b45e9c93

ℹ️ 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/core/src/thread_manager.rs Outdated
Comment thread codex-rs/thread-store/src/local/helpers.rs
@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/process-thread-store branch from f1b45e9 to df35d23 Compare May 1, 2026 00:44
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep it up!

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

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/process-thread-store branch from df35d23 to a2db94e Compare May 1, 2026 00:52
@wiltzius-openai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🎉

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

@wiltzius-openai wiltzius-openai merged commit fe05aca into main May 1, 2026
25 checks passed
@wiltzius-openai wiltzius-openai deleted the wiltzius/codex/process-thread-store branch May 1, 2026 04:25
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants