Programs Oda runs

Some tasks go better as one small program. DataMind Oda writes a program that calls its usual tools as ordinary steps, runs it, and the run appears in the chat as a step of its own. This page covers that run: what it shows, where it happens, what it may touch, and the limits and failure messages that come with it.

What a run is

What a run shows in the chat

Where a run happens

Time and output limits

WhatThe limit
Time budget120,000 ms (about two minutes) by default. Every run from a chat has a deadline, and it cannot be switched off; Oda can ask for a longer budget, and anything above the ceiling is capped at 600,000 ms (ten minutes).
What the budget coversThe whole run, including time spent waiting for the calls it makes and for your answers. It counts elapsed time, not processor time.
OutputThe printed lines and the returned value share a cap of 64 MiB (67,108,864 bytes). Past the cap, the fitting part of the output is kept and the run ends as an output-limit failure.
MemoryThe program's own memory has a ceiling (a heap limit of 512 MiB by default). It is not a total memory cap for everything the run starts.

Approving a wider run

When a run fails

A failed run is not a broken chat: it comes back to Oda as an ordinary result, and Oda can adjust the work. The failure reads:

code run failed (<kind>): <message>

The word in the parentheses names the failure kind, and the detail after the colon says what happened. When the program printed anything before it failed, the fitting part of that output follows under Captured output:. A run out of time reads, for example, code run failed (timeout): execution deadline reached (120000ms).

KindWhat it means
exceptionThe program hit an error, or it could not be understood and did not run.
timeoutThe run reached its time budget.
abortThe run was stopped; a stopped run reports as an abort.
worker-exitThe run's process ended early, or its cleanup did not finish cleanly.
invalid-outputThe value the program returned cannot be carried as plain data.
output-limitThe run produced more output than the cap allows; the fitting part is kept.
protocolThe run's own communication became malformed or too heavy, so the run was stopped.
sandbox-unavailableThe limits could not be applied on this computer, so the run did not start; Oda never runs a program without its limits.

Questions, answered

Why does Oda sometimes write a program?

Some tasks go faster as one program: it calls the tools it needs as ordinary steps and returns one result, instead of a long line of separate calls. Whether a chat works this way is decided when its agent is set up; Tools and how they are offered explains the forms.

Where does a program run?

On your computer, in its own fresh process, under the chat's access mode. File changes follow the mode like any other step, the run starts with an empty environment, and nothing is kept from one run to the next.

Which tools can a program call?

The tools the chat may use. It calls them as ordinary calls, and each call keeps its own approvals and limits, so a call that needs your answer still asks.

Why did a run ask to run with wider access?

The program tried to change files the chat's mode does not allow, so the change was denied and Oda asked to run that one program once with wider access. The request carries Oda's one-sentence reason and covers that complete run only. When Oda needs more access covers the card and how to answer it.

What happens if I stop the work while a program runs?

The run stops and reports as a stopped run: its failure kind is abort, and the output it produced before the stop is kept. What a stop leaves behind is on Stopping Oda and queued messages.

Can I read the program that ran?

Yes. The step keeps the program itself, so you can read the code that ran; its title is the short description Oda wrote for it.

What does (run_code completed with no output) mean?

The run finished cleanly, but the program printed nothing and returned nothing. What it did is recorded in the calls it made; the note stands in place of an empty output.

What do the failure kinds mean?

The word in the parentheses names what ended the run: exception, timeout, abort, worker-exit, invalid-output, output-limit, protocol or sandbox-unavailable. The table under When a run fails gives each meaning, and the detail after the colon says what happened.

What does a run leave in the chat?

The run's printed lines and its returned value come back when it ends, and the calls the program made stay recorded with the run. Only the run's own output and value continue the conversation; the calls inside the program do not become messages of their own. Tool catalog and session events covers what the record keeps.