Configure the default code-mode exec yield timeout (#37352)

## What changed

- Add `features.code_mode.default_exec_yield_time_ms`, defaulting to 30 seconds.
- Apply the configured default to code-mode `exec` calls that omit `yield_time_ms` and reflect it in the tool description.
- Remove the `code_mode_buffered_exec` compatibility feature flag.

## Testing

- Cover config loading and tool descriptions for both default and custom yield timeouts.

GitOrigin-RevId: 581ffc737b04721c7b5fc81260b1da1cf7d87523
This commit is contained in:
pakrym-oai authored and copyberry committed 2026-08-07 01:41:54 +00:00
1 parent 9457f8f734
commit d0c8f422ea
11 files changed
+64 -38

No files matched your search

+2
View File
@@ -538,6 +538,7 @@ async fn load_config_resolves_code_mode_config() -> std::io::Result<()> {
r#"
[features.code_mode]
enabled = true
default_exec_yield_time_ms = 10000
excluded_tool_namespaces = ["mcp__codex_apps", "multi_agent_v1"]
direct_only_tool_namespaces = ["mcp__history", "mcp__notes"]
@@ -554,6 +555,7 @@ disable_in_process_fallback = true
)
.await?;
assert_eq!(config.code_mode.default_exec_yield_time_ms, 10_000);
assert_eq!(
config.code_mode.excluded_tool_namespaces,
vec!["mcp__codex_apps".to_string(), "multi_agent_v1".to_string()]