Some tasks are carried out as a small program: Oda writes one program that uses its usual tools as ordinary calls, runs it, and the result returns to your chat. This page covers what you see in the chat, what a program may use, and the limits and messages that come with it.
Whether a chat works this way is decided when its agent is set up; Tools and how they are offered describes that choice.
log, info, warn, error and debug. They come back with the result and stay with the card's output.$tools, lambda or console are refused.| What | The limit |
|---|---|
| Time budget | 120,000 ms (about two minutes) by default. A longer budget must be a positive number, and anything above the ceiling is capped at 600,000 ms (ten minutes). A budget of zero does not remove the deadline. |
| What the budget covers | The whole run, including waiting for the steps the program calls and for your approvals. It is not a measure of processor time. |
| Output | The lines a program printed and its result are capped together at 64 MiB (67,108,864 bytes). Past the cap, the fitting part of the output is kept and the result says the limit was hit. |
| Memory | The program's own memory is capped at 512 MiB (a heap limit). It is not a total memory cap for everything the run starts. |
A run started from the chat always has a deadline; runs that other parts of Oda start, such as a workflow, can be given no deadline at all.
File sandbox enforcement is partial on this host.; when the file sandbox denied an operation, it says so and names the mode the run used.The modes, blocked steps and wider retries are described in full on Command sandboxing and approvals.
A failed run is reported in the chat and to Oda: the row replaces the program's description with the first line of the failure, and the card keeps the full text under OUT, followed by any lines the program printed before it failed and the file-sandbox facts for the run. Oda reads the same failure and can adjust the work and try again.
The failure names the reason and its detail, for example:
Error: code run failed (timeout): execution deadline reached (120000ms) when the time budget ran out; the number is the deadline that expired.Error: code run failed (output-limit): outer output exceeded <bytes> bytes when the output went past the cap, with the fitting part of the output kept.Values move between the program and Oda as plain data: text, numbers, true or false, lists and objects, without gaps or special values. A value that cannot make that trip fails the run instead of being replaced, and a standard line says so:
program completion must be lossless JSON: the value the program returned cannot be carried out of the run.program threw an unrenderable value: the program threw something the failure text cannot show.binding arguments must be lossless JSON: a call the program made passed arguments that cannot be carried as plain data.cannot encode a sparse JSON array: a list with an empty slot (a gap) cannot be encoded.The step is a program Oda wrote: it works through several tool calls in one run, and the card carries the program. Open the row to read it, and look under the row for the steps it called.
The run keeps its output until it settles: the printed lines and the result arrive together when the run ends, under OUT. The steps it calls are shown as they happen, nested under the Code row.
About two minutes by default, and ten minutes at most: Oda can ask for a longer budget, but only as a positive number, and larger requests are capped. The budget covers the whole run, including waiting for the steps it calls and for your approvals.
The run ends and reports it, reading like Error: code run failed (timeout): execution deadline reached (120000ms). The output the program produced before the deadline is kept with the result.
Error: code run failed mean?A program failed before it finished. The parentheses name the reason, such as a timeout, a stop or output past the cap, and the rest of the line carries the detail. Oda reads the same failure and can adjust the work and try again.
Values move between the program and Oda as plain data: text, numbers, true or false, lists, and objects, without gaps or special values. A value that cannot survive that trip fails the run and is reported, reading like program completion must be lossless JSON or cannot encode a sparse JSON array.
No. Each run starts with an empty environment: only a few system variables it needs to start other programs are kept.
No. Each run starts fresh: no state is kept from earlier runs.
The lines it printed and its result are capped together at 64 MiB. Past the cap, the fitting part of the output is kept and the result says the limit was hit.
Yes. A program runs under the chat's access mode, like any other step, and its result reports how the limits were applied, including when they could only be applied partly on this computer. The steps it calls keep their own approvals and limits, and a wider retry for a blocked program must be approved and covers the whole run. See Command sandboxing and approvals.
The program's output is only what it printed or returned. A program that did neither still did its work through the steps it called, and the output says the run completed with no output instead of showing an empty result.