Skip to content

Add feature-gated freeform js_repl core runtime#10674

Merged
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hn_dbch6anby6
Feb 11, 2026
Merged

Add feature-gated freeform js_repl core runtime#10674
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hn_dbch6anby6

Conversation

@fjord-oai
Copy link
Contributor

@fjord-oai fjord-oai commented Feb 4, 2026

Summary

This PR adds an experimental, feature-gated js_repl core runtime so models can execute JavaScript in a persistent REPL context across tool calls.

The implementation integrates with existing feature gating, tool registration, prompt composition, config/schema docs, and tests.

What changed

  • Added new experimental feature flag: features.js_repl.
  • Added freeform js_repl tool and companion js_repl_reset tool.
  • Gated tool availability behind Feature::JsRepl.
  • Added conditional prompt-section injection for JS REPL instructions via marker-based prompt processing.
  • Implemented JS REPL handlers, including freeform parsing and pragma support (timeout/reset controls).
  • Added runtime resolution order for Node:
    1. CODEX_JS_REPL_NODE_PATH
    2. js_repl_node_path in config
    3. PATH
  • Added JS runtime assets/version files and updated docs/schema.

Why

This enables richer agent workflows that require incremental JavaScript execution with preserved state, while keeping rollout safe behind an explicit feature flag.

Testing

Coverage includes:

  • Feature-flag gating behavior for tool exposure.
  • Freeform parser/pragma handling edge cases.
  • Runtime behavior (state persistence across calls and top-level await support).

Usage

[features]
js_repl = true

Optional runtime override:

  • CODEX_JS_REPL_NODE_PATH, or
  • js_repl_node_path in config.

git stack

@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch 4 times, most recently from 6d093b3 to c1337ef Compare February 4, 2026 22:39
@fjord-oai fjord-oai marked this pull request as ready for review February 4, 2026 22:41
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch from c1337ef to 6d6ac7d Compare February 5, 2026 03:16
@fjord-oai fjord-oai requested a review from bolinfest February 5, 2026 03:25
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch 8 times, most recently from 5797e44 to a9e1fc3 Compare February 6, 2026 23:49
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 9, 2026
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch 6 times, most recently from e6004d4 to 9cbbf46 Compare February 10, 2026 18:45
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch from 9cbbf46 to 5288465 Compare February 11, 2026 05:50
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch 3 times, most recently from b26c1c9 to 34ad836 Compare February 11, 2026 19:22
git-stack-id: fjord/js_repl_seq---4hn_dbch6anby6
git-stack-title: Add feature-gated freeform js_repl core runtime
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dbch6anby6 branch from 34ad836 to 9b26477 Compare February 11, 2026 19:47
@fjord-oai fjord-oai merged commit 42e22f3 into main Feb 11, 2026
32 checks passed
@fjord-oai fjord-oai deleted the fjord/js_repl_seq---4hn_dbch6anby6 branch February 11, 2026 20:05
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants