mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Paginated thread history can persist large MCP results in completed tool-call items. Bound these stored results to avoid retaining multi-megabyte payloads. ## What changed Apply a 64 KiB preview budget when persisting oversized MCP results in paginated history. Replace the result with a truncated text preview of its serialized JSON, preserving `is_error` and clearing `structuredContent` and `_meta`. Leave small results unchanged. Share the truncation helper with the existing MCP tool-call event path. ## Testing Add helper tests for unchanged small results and oversized results with structured content and metadata. Add a thread-history test verifying that persisted MCP results contain a bounded preview with the beginning, end, and truncation marker while preserving tool arguments. GitOrigin-RevId: 09dce73c70bfd357c9b9630f456e9e5c1d8492cf
57 lines
1.4 KiB
TOML
57 lines
1.4 KiB
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-rollout"
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
name = "codex_rollout"
|
|
path = "src/lib.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codex-utils-process = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
codex-extension-items = { workspace = true }
|
|
codex-file-search = { workspace = true }
|
|
codex-git-utils = { workspace = true }
|
|
codex-history = { workspace = true }
|
|
codex-otel = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-state = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-output-truncation = { workspace = true }
|
|
codex-utils-path = { workspace = true }
|
|
codex-utils-string = { workspace = true }
|
|
memchr = { workspace = true }
|
|
regex = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
time = { workspace = true, features = [
|
|
"formatting",
|
|
"local-offset",
|
|
"macros",
|
|
"parsing",
|
|
] }
|
|
tokio = { workspace = true, features = [
|
|
"fs",
|
|
"io-util",
|
|
"macros",
|
|
"process",
|
|
"rt",
|
|
"sync",
|
|
"time",
|
|
] }
|
|
tracing = { workspace = true }
|
|
uuid = { workspace = true }
|
|
zstd = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
codex-utils-absolute-path = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|