mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
Retain TUI delegation prompts in thread model history (#61210)
## What changed Set `retain: true` on tool outputs submitted when TUI dynamic tools start a turn, requesting retention of delegation prompts in the thread's model history. ## Testing Update session lifecycle assertions to require `retain: true` for both `create_thread` and `send_message_to_thread` requests. GitOrigin-RevId: 095d0f6f687a67fbf0b5ffd98539f764d32e2acc
This commit is contained in:
@@ -3276,6 +3276,7 @@ async fn check_dynamic_tool_requests(
|
||||
serde_json::json!({
|
||||
"name": "create_thread",
|
||||
"namespace": "codex_tui",
|
||||
"retain": true,
|
||||
"output": format!(
|
||||
"<codex_delegation>\n <source_thread_id>{creation_source}</source_thread_id>\n <input>Check <main> & report</input>\n</codex_delegation>"
|
||||
)
|
||||
@@ -3361,6 +3362,7 @@ async fn check_dynamic_tool_requests(
|
||||
serde_json::json!({
|
||||
"name": "send_message_to_thread",
|
||||
"namespace": "codex_tui",
|
||||
"retain": true,
|
||||
"output": format!(
|
||||
"<codex_delegation>\n <source_thread_id>{thread_id}</source_thread_id>\n <input>Follow <up> & report</input>\n</codex_delegation>"
|
||||
)
|
||||
|
||||
@@ -1271,7 +1271,7 @@ async fn start_turn(
|
||||
// Older app-server/TUI versions are intentionally unsupported:
|
||||
// preserving tool authority takes precedence over legacy fallback.
|
||||
tool_output: Some(Box::new(TurnToolOutput {
|
||||
retain: false,
|
||||
retain: true,
|
||||
name: tool.to_string(),
|
||||
namespace: Some(NAMESPACE.to_string()),
|
||||
output: FunctionCallOutputBody::Text(prompt),
|
||||
|
||||
Reference in New Issue
Block a user