Skip to content

Add ThreadManager sample crate#20141

Merged
pakrym-oai merged 6 commits intomainfrom
pakrym/thread-manager-sample
Apr 29, 2026
Merged

Add ThreadManager sample crate#20141
pakrym-oai merged 6 commits intomainfrom
pakrym/thread-manager-sample

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Summary:

  • Add codex-thread-manager-sample, a one-shot binary that starts a ThreadManager thread, submits a prompt, and prints the final assistant output.
  • Pass ThreadStore into ThreadManager::new and expose thread_store_from_config for existing callsites.
  • Build the sample Config directly with only --model and prompt inputs.

Verification:

  • just fmt
  • cargo check -p codex-thread-manager-sample -p codex-app-server -p codex-mcp-server
  • git diff --check

Tests: Not run per request.

@pakrym-oai pakrym-oai requested a review from a team as a code owner April 29, 2026 05:13
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

.read_stored_thread_for_new_fork(
fork_thread_store.as_ref(),

P1 Badge Read forked thread from the same persistence backend

fork_thread_store is derived from the fork request config, but fork_thread_from_history now persists via ThreadManager’s startup-time store. If experimental_thread_store differs at runtime, this read targets a different backend and can fail with thread-not-found right after a successful fork creation.

ℹ️ 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
@pakrym-oai pakrym-oai force-pushed the pakrym/thread-manager-sample branch from 6c6ec37 to b5535d4 Compare April 29, 2026 16:05
Comment thread codex-rs/core/src/thread_manager.rs Outdated
Comment thread codex-rs/core/src/thread_manager.rs Outdated
@pakrym-oai pakrym-oai enabled auto-merge (squash) April 29, 2026 18:04
@pakrym-oai pakrym-oai disabled auto-merge April 29, 2026 18:21
@pakrym-oai pakrym-oai merged commit 8356806 into main Apr 29, 2026
27 of 28 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/thread-manager-sample branch April 29, 2026 18:21
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 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.

2 participants