Repository navigation
Orca v0.5.23
run_script now runs inside Orca, in an embedded JavaScript engine, and no longer needs Node.js. Calls a script starts together run at the same time, the terminal UI shows the script the model wrote and what each of its calls did, and that record is saved with the session. The tool is still experimental and off by default: a second comparison with it on and off showed neither a saving nor a cost.
Changes
run_scriptruns in process. A script used to run in a Node.js process of its own. It now runs in a QuickJS engine (QuickJS-NG throughrquickjs0.14) created inside Orca for each script and dropped after it, so the tool works on a machine without Node.js and a script starts with no process to launch. The engine has no file, network, process or timer API; a script still reaches the outside only throughtools.read_file,tools.glob,tools.grepandtools.git_status, and each call is still checked by the runtime (the four-name list, the read-only check, the tool's schema, thePreToolUsehook) and run under the read-only profile. Onaarch64-apple-darwinthe release binary grows by 1,019,360 bytes (71,348,400 to 72,367,760).- Calls started together run together. Calls a script starts before it awaits, as with
Promise.all, are one batch. The runtime checks them one by one in the order they were started, runs everyPreToolUsehook of the batch before any call of it, and then runs the calls at the same time, up totools.max_read_parallel(8 by default). Answers go back in start order. The tool's description tells the model so. - Limits.
[tools.script] memory_limit_mb(64 by default, never less than 8) is new: a script that would hold more fails withthe script used more than 64 MiB.timeout_secs(60) andmax_tool_calls(100) are unchanged, andtimeout_secsis now held between one second and one day. The arguments of calls waiting to be answered may hold 256 KiB of text in all, and 1000 calls may wait at once; a script past either is told to await some calls first. The script's own call stack is limited, and a script that recurses without end fails with QuickJS'sRangeError: Maximum call stack size exceeded. - When a script's time is up. The calls it has running are stopped and the calls it has not started are not started; a
PreToolUsehook already running for one of them finishes first.grep,globandgit_statusnow stop when asked, asread_filedid:grepandgit_statusend thergorgitthey started, andglobstops walking. The same holds when the model calls them directly, so a cancelled turn no longer waits for a search to finish; the call ends as cancelled, withgrep was cancelled,glob was cancelledorgit_status was cancelled. - A script that cannot be stopped. QuickJS asks whether to stop between the steps of a script and inside a regular-expression match, but not inside every built-in operation that loops on its own: reversing an object that claims to hold 2^53 items never asks. Such a script is stopped on time like any other and the turn goes on, but the operation keeps a CPU core busy, and the script's memory, until it finishes or Orca exits. While two such scripts are still running in an Orca process,
run_scriptrefuses to start another there and says why. - Seeing a run in the terminal UI. A
run_scriptrow opens with a click or ctrl+o and shows three sections:Script, the script the model wrote, with line numbers;Calls, one entry per call with its arguments, how it ended, how long it took, the size of what came back and its first lines, with┬ ├ └joining the calls of one batch; andReturned to the model, orFailedwith the error, orCancelledwhen the script was interrupted. Each batch of calls appears when it ends, while the script is still running; when the script ends, the row's first line ends with the number of calls and the time the run took. The model still receives only what the script returned. - A command's output shows while it runs. In a turn typed directly, the terminal UI showed nothing of a
bashcommand until it ended; only a turn started from a queued message showed its output as it came. Output now appears as the command writes it, at most five times a second, up to 64 KiB for one command, after which a line says the rest is shown when the command ends. It is written to the session file as it is shown, so a command that prints a lot adds up to 64 KiB there. An ACP client receives the same pieces as in-progress updates of the tool call. - A run's calls are saved with the session. What
run_scriptwrites of its calls is recorded batch by batch, so the row shows them afterorca --resume, after switching back from a side conversation (/side) or an agent's conversation, and in a session attached while the script ran. A script that makes all 100 calls it is allowed adds about 130 KiB to its session file, and no script adds more than about 256 KiB: one allowed many more calls keeps the first of them and a line saying how many were left out. A row saysCalls were not recorded for this runfor a script run by an earlier version, and for one whose result Orca wrote itself after an interruption when no batch had ended by then. /scripts. A new slash command prints whetherrun_scriptis on, its limits (the time limit as the script is held to it, between one second and one day), the tools a script can call, and the description and parameter schema the model is sent for the tool, read from the tool registry.- The output stream of a script.
orca execin text mode andtool.output.deltain JSONL carry the same text the terminal UI arranges. Each call is now a summary line,2 ┬ read_file {"path":"a.rs"} · ok · 3ms · 1.2 KiB, followed by up to five lines of what came back, indented by ten spaces and cut at 120 characters and 400 bytes, and the last line carries the run's time:4 tool calls · 412ms. Control characters and the characters that set the direction text is drawn in are written as�, and a tab as the spaces to the next tab stop. An ACP client receives the same text as one in-progress update of the tool call just before the completed one.
Fixes
- A turn started from a queued message was missing after a resume. A message sent while a turn is running is queued and gets a turn of its own when that turn ends. That turn was shown as it ran but was not part of the conversation the terminal UI rebuilds, so after
orca --resume, or after switching back from/sideor an agent's conversation, the message, its tool rows and its answer were gone from the screen (the model still had them). The same held for the turn Orca starts on its own when a background agent finishes while the conversation is idle. Both are now recorded like a turn typed directly and stay on screen; the second is shown under the noteBackground agents finished; continuing with their results. The reasoning_content in the thinking mode must be passed back to the API. DeepSeek refuses a request in thinking mode unless every assistant message after the last user message carries its reasoning. A turn that went on after the model had answered, because a background agent's result arrived before the turn returned, sent that answer without it and failed with this error; so did the round after a tool call the model made without any reasoning. Such messages are now sent with their reasoning, or an empty one, and keep it in later requests so the cached prefix does not change.- Two things a turn started from a queued message showed wrongly. Its reasoning line appeared twice, above and below a tool row, while the tool ran. Pressing Esc during it printed
Request was not startedwithprompt queue revision conflictnext to the interruption notice, although the interrupt had worked. Both are gone. - Reasoning shown above the wrong reply after a resume. When a turn went on after the model had answered, because a background agent's result arrived, the rebuilt conversation showed the later reply's reasoning above the earlier reply. Each reply now keeps its own reasoning above it.
- On Windows without PowerShell 7, a command with quotes in it failed. Orca runs commands through
cmd.exethere, and handed it the command quoted the way other programs expect, so every quote of the command arrived with a backslash before it:echo done > "my notes.txt"failed withThe filename, directory name, or volume label syntax is incorrect. The command now reachescmd.exeas written, for a command run with pipes, with a terminal, or in the sandbox. - On a Windows system whose language is not English, what
cmd.exeand the system's tools printed could be unreadable. They write in the console's code page (GBK on a Chinese system), and Orca read it as UTF-8, so an error message came out as a row of�. Orca now sets its console's output code page to UTF-8 while it runs and puts the previous one back when it exits. On the Chinese Windows 11 this was tested on, Windows then printed these messages in English. --cwdwith a relative path.orca exec --cwd subended withfailed to start runtime thread: invalid surface cwd: NonCanonical, on every system; so did a path with..in it or a separator at its end. The directory is now resolved against the one Orca was started in.- Paths the terminal UI shows on Windows. The first-run panel and the
/trustmessages showed the workspace as\\?\C:\Users\dev\work, the spelling Windows gives a path it has resolved, and the footer mixed separators (~/work\orca). They now readC:\Users\dev\workand~\work\orca. A network share is shown as\\server\share\….
Measurement
Five repository questions, three runs each way, through orca exec against the real provider on 2026-11-19. All 30 runs ended normally.
run_script off |
run_script on |
|
|---|---|---|
| Runs | 15 | 15 |
| Answers right | 15 | 15 |
| Model rounds | 53 | 57 |
| Cost (USD) | 0.018668 | 0.017745 |
With the tool on, the model called it in 3 of the 15 runs (5 calls in all), and the runs that used it took no fewer rounds. Four of the tasks took two to four rounds and the fifth five to eight, which leaves a script little to save, and 53 rounds against 57 is within the spread between runs of the same task. The comparison shows neither a saving nor a cost, so enabled stays false by default.
Compatibility
- Node.js is no longer used by
run_script. Withenabled = truethe tool is advertised whether or not Node.js is installed. Workflows still use Node.js as before. - What a script can do has changed in one way.
evalandFunctionexist in a script, where the Node.js host disabled code generation from strings. They give a script nothing it did not have: the engine holds no API beyond the language's own and the fourtoolsfunctions. There are still no timers, andqueueMicrotaskis absent. A script that relied on V8-specific behaviour, such as the exact text of an error's stack, may behave differently. - Hooks. A
PreToolUsehook still runs once for each call a script makes and may rewrite or block it. For a batch, every hook of the batch now runs before the first call of the batch, where each used to run just before its own call. - Consumers of the output stream. A program that counted a script's calls by lines containing
·must count summary lines only;scripts/eval/code_mode/run.pydoes. No event field is added, renamed or removed. - Session files. A
run_scriptresult is preceded in its recorded commit by the tool's output, using a patch (OutputDelta) and a field (streamed_output) the format already had, so earlier versions read these sessions and the runtime-surface contract is unchanged. - Cancelling a search. A direct
grep,globorgit_statusthat is cancelled now returns a cancelled result at once where it used to finish first. - Configuration. The only new key is
[tools.script] memory_limit_mb. The script host module and its entry in the Windows platform contract are removed.
Verification
Release gates run with framework retries disabled. Linux and native Windows x64/ARM64 checks must pass on the final main commit before the tag is pushed. This is the first release whose Windows builds compile the embedded C engine, so the Windows jobs on that commit are the first evidence that it builds and that the engine's tests pass there.
The changes ship with engine contract tests (scripts that return, log, fail and call tools; batches and their order; the wall clock, the cancel, the memory limit met at once and in small pieces, the stack limit, a regular expression that backtracks without end, native loops that are left behind and counted, a script that leaves the function it is the body of, and scripts that replace Promise, JSON and Object.prototype members), runtime tests for the checks, the limits, parallel batches and the output format, tool tests for cancelling grep, glob and git_status, terminal UI tests for the row, the rebuilt row and /scripts, and a real run that was resumed to confirm its calls were read back from the session file.
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked -j 1
cargo nextest run -p orca-tui --lib --locked --profile ci-serial --retries 0
cargo nextest run --test tui_pty_contract --locked --profile ci-serial --retries 0
cargo nextest run --workspace --all-targets --locked --profile ci --no-fail-fast --retries 0
node scripts/release/verify-version-sync.mjs
node scripts/release/test-stage-npm.mjs
node scripts/release/test-verify-published.mjs
npm --prefix site run build
npm --prefix site run check:seoUpgrade
npm install -g @blade-ai/orca@0.5.23
orca --versionOr install the native binary with the installer on https://orcaagent.dev/.
run_script is still off by default. To try it, add this to your user configuration and start a new session; nothing needs to be installed now:
[tools.script]
enabled = true