Skip to content

Add js_repl host helpers and exec end events#10672

Merged
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hn_dcnepr036e
Feb 12, 2026
Merged

Add js_repl host helpers and exec end events#10672
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hn_dcnepr036e

Conversation

@fjord-oai
Copy link
Contributor

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

Summary

This PR adds host-integrated helper APIs for js_repl and updates model guidance so the agent can use them reliably.

What’s included

  • Add codex.tool(name, args?) in the JS kernel so js_repl can call normal Codex tools.
  • Keep persistent JS state and scratch-path helpers available:
    • codex.state
    • codex.tmpDir
  • Wire js_repl tool calls through the standard tool router path.
  • Add/align js_repl execution completion/end event behavior with existing tool logging patterns.
  • Update dynamic prompt injection (project_doc) to document:
    • how to call codex.tool(...)
    • raw output behavior
    • image flow via view_image (codex.tmpDir + codex.tool("view_image", ...))
    • stdio safety guidance (console.log / codex.tool, avoid direct process.std*)

Why

  • Standardize JS-side tool usage on codex.tool(...)
  • Make js_repl behavior more consistent with existing tool execution and event/logging patterns.
  • Give the model enough runtime guidance to use js_repl safely and effectively.

Testing

  • Added/updated unit and runtime tests for:
    • codex.tool calls from js_repl (including shell/MCP paths)
    • image handoff flow via view_image
    • prompt-injection text for js_repl guidance
    • execution/end event behavior and related regression coverage

git stack

@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 4, 2026 20:15
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 8bb2e54 to 67d6633 Compare February 4, 2026 20:15
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 4, 2026 20:15
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 4, 2026 21:13
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 67d6633 to 8dd500e Compare February 4, 2026 21:13
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 4, 2026 21:13
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 4, 2026 22:15
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 8dd500e to 676bc7d Compare February 4, 2026 22:15
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 4, 2026 22:15
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 4, 2026 22:39
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 676bc7d to c4f3cd8 Compare February 4, 2026 22:39
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 4, 2026 22:39
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 5, 2026 03:16
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from c4f3cd8 to 333601f Compare February 5, 2026 03:16
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 5, 2026 03:16
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 5, 2026 04:54
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 333601f to ff24d97 Compare February 5, 2026 04:54
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 5, 2026 04:54
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 5, 2026 05:29
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from ff24d97 to 608b2c1 Compare February 5, 2026 05:29
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 5, 2026 05:29
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 5, 2026 16:31
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 608b2c1 to 0b33c6c Compare February 5, 2026 16:32
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 5, 2026 16:32
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 5, 2026 17:27
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 5, 2026 17:27
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from bca106c to f5a4f98 Compare February 9, 2026 20:31
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 9, 2026 20:31
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 9, 2026 20:57
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from f5a4f98 to 527e459 Compare February 9, 2026 20:57
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 9, 2026 20:57
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 9, 2026 23:49
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 527e459 to c83a628 Compare February 9, 2026 23:49
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 9, 2026 23:49
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 10, 2026 01:19
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from c83a628 to d1d2143 Compare February 10, 2026 01:19
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 10, 2026 01:19
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 10, 2026 17:41
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from d1d2143 to 79583a3 Compare February 10, 2026 17:41
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 10, 2026 17:41
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 10, 2026 18:45
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 79583a3 to 611bc38 Compare February 10, 2026 18:45
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 10, 2026 18:45
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 11, 2026 05:50
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 611bc38 to c6ae99e Compare February 11, 2026 05:50
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 11, 2026 05:50
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 11, 2026 17:21
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from c6ae99e to 7a9453e Compare February 11, 2026 17:21
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 11, 2026 17:21
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4hn_dbch6anby6 to main February 11, 2026 17:39
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hn_dcnepr036e branch from 7a9453e to 25fa388 Compare February 11, 2026 17:39
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4hn_dbch6anby6 February 11, 2026 17:39
git-stack-id: fjord/js_repl_seq---4hn_dcnepr036e
git-stack-title: Add js_repl host helpers and exec end events
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