Add buffered code-mode exec yields (#34441)

## What changed

- Add the experimental `code_mode_buffered_exec` feature.
- When enabled, default code-mode `exec` calls without an explicit
  `yield_time_ms` to 30 seconds instead of 10 seconds.
- Report the effective default in the model-visible `exec` tool description.

## Testing

- Verify that the generated tool description advertises the 30-second default
  when the feature is enabled.

GitOrigin-RevId: 0eea4d0105137f09050ce31aad18c25c79df6b2a
This commit is contained in:
pakrym-oai
2026-07-21 02:02:15 +00:00
committed by copyberry
parent c0cd337766
commit 99efeef650
9 changed files with 92 additions and 18 deletions

View File

@@ -92,6 +92,8 @@ pub enum Feature {
// Experimental
/// Enable JavaScript code mode backed by the in-process V8 runtime.
CodeMode,
/// Use a 30-second default yield timeout for code mode exec calls.
CodeModeBufferedExec,
/// Run JavaScript code mode in the standalone host process.
CodeModeHost,
/// Restrict model-visible tools to code mode entrypoints (`exec`, `wait`).
@@ -859,6 +861,12 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::CodeModeBufferedExec,
key: "code_mode_buffered_exec",
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::CodeModeHost,
key: "code_mode_host",