Files
codex/codex-rs/thread-manager-sample/README.md
pakrym-oai 8de2a7a16d Add codex-core public API listing (#20243)
Summary:
- Add a checked-in codex-core public API listing generated by
cargo-public-api.
- Add scripts/regen-public-api.sh with an embedded crate list,
auto-install for cargo-public-api 0.51.0, pinned nightly, and --check
mode.
- Add Rust CI jobs on the codex Linux x64 runner pool to verify the
listing stays up to date.

Testing:
- bash -n scripts/regen-public-api.sh
- just regen-public-api --check
- yq '.' .github/workflows/rust-ci.yml
.github/workflows/rust-ci-full.yml
- git diff --check
2026-04-29 22:58:08 +00:00

22 lines
512 B
Markdown

# ThreadManager Sample
Small one-shot binary that starts a Codex thread with `ThreadManager` from
`codex-core-api`, submits a single user turn, and prints the final assistant
message.
```sh
cargo run -p codex-thread-manager-sample -- "Say hello"
```
Use `--model` to override the configured default model:
```sh
cargo run -p codex-thread-manager-sample -- --model gpt-5.2 "Say hello"
```
The prompt can also be piped through stdin:
```sh
printf 'Say hello\n' | cargo run -p codex-thread-manager-sample
```