mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Add optional tool output rendering for context window hints (#61452)
## What changed Add the token-budget setting `context_window_as_tool_output`, defaulting to `false`. When enabled, render agent identity, context window IDs, and associated hints as an `agent.thread_hint` tool output. Use the same format for agent identity updates in forked threads. Preserve this setting when applying model token-budget defaults without treating it as an explicit budget override. ## Testing Update fork scenario snapshots to cover tool output rendering, including a child agent's window hint after its inherited parent context and a prediction fork above the compaction threshold. GitOrigin-RevId: e1a7089935bd0aed44ffd15f0ae3ec41a2607218
This commit is contained in:
committed by
copyberry
parent
d26406987e
commit
c2c1ebba0a
@@ -415,6 +415,9 @@ pub struct TokenBudgetConfigToml {
|
||||
/// Whether to expose the built-in history and notes extension.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub use_history_notes_extension: Option<bool>,
|
||||
/// Render the context window and its hints as an agent.thread_hint tool output.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub context_window_as_tool_output: Option<bool>,
|
||||
/// Number of tokens remaining before auto-compaction when the wrap-up reminder is emitted.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(range(min = 1))]
|
||||
|
||||
Reference in New Issue
Block a user