While DataMind Oda works on a task, it can run commands on your computer in a bash shell that stays alive between commands. What one command sets up, the next can use. This page explains what the shell keeps, what closes it, and what the notes in its output mean.
Oda keeps one bash shell per agent and reuses it for every command that agent runs. The first command starts the shell; later commands join the same one.
The limits on what a command may change are covered in Sandboxing and command limits.
The shell is one long-running process, so it carries context from each command to the next:
For commands that run in a fresh process each time instead, see Bash and PowerShell command tools.
Some outcomes close the shell instead of keeping it:
exit.After any of these, the result carries the reset message:
The persistent bash shell was reset; the next bash call starts from the workspace with a fresh current directory and environment.
The next command starts in the chat's workspace folder, with no variables, functions or folder changes from before.
A command that reaches the time limit keeps the output it had produced so far. Its result starts with:
Your command timed out after <n> seconds or experienced an OOM error.
A command result ends with one of these status lines:
| Note | What it means |
|---|---|
[Command finished with exit code N] | The command finished. Exit code 0 means it succeeded; any other code means it reported a failure. |
[shell exited: code N] | The shell itself ended with this code, for example when a command ran exit. |
[shell killed by signal: SIG] | The shell was ended by a signal. |
[shell exited] | The shell ended without reporting a code or a signal. |
[Command timed out or OOM] | The command reached the time limit or ran out of memory. |
When a command ends the shell, the result also carries the reset message, and the next command starts a fresh shell.
Oda keeps the earliest part of a command's output, up to a limit (16,000 characters by default). When a command produces more, the result is marked <response clipped> and carries this note:
<response clipped><NOTE>To save on context only part of this file has been shown to you. You should retry this tool after you have searched inside the file with `grep -n` in order to find the line numbers of what you are looking for.</NOTE>
If the terminal dropped the beginning of the output, the note says so instead, so the shown text is never passed off as the complete output:
<response clipped><NOTE>The beginning of this command output was dropped by the terminal scrollback limit. The following text is the earliest retained output.</NOTE>
Rarely, Oda reports one of these instead of running the command:
bash requires an owning agent session: the command was not attached to an agent, so it did not run. Start the task from a chat; if it repeats, contact your DataMind OS administrator with the message.belongs to another session: Oda tried to read a background job that belongs to another session. A job can be read only where it was started.Yes. The shell stays alive, so a folder change, an exported variable or a function defined by one command is still in effect for the next. They are cleared only when the shell resets.
[Command timed out or OOM]?The command did not finish within its time limit (five minutes by default), or it ran out of memory. Oda stops it, keeps the output it had produced so far, and resets the shell; the next command starts fresh from the workspace.
[Command finished with exit code N] mean?The command finished and reported this exit code. Zero means it succeeded; any other code means the command reported a failure.
[shell exited: code N] mean?The shell itself ended with this code, usually because the command ran exit. The result also carries the reset message, and the next command starts a new shell.
No. The shell cannot hand your input to a waiting program, so such a command blocks until the time limit stops it, and the shell resets.
The terminal keeps a limited amount of output. If it dropped the beginning, the result says so and shows the earliest retained text. Treat what you see as partial.
Oda keeps the earliest part of the output, up to its limit (16,000 characters by default), and marks the rest as clipped. Ask Oda for the missing part, or open the file from the workspace.
The command is cancelled and the shell resets. The next command starts from the workspace with a fresh environment.
It stays alive while the agent that owns it lives, and closes with that agent. A different agent starts its own shell; nothing is passed between them.
The first command starts the shell for that agent, which takes a moment. Later commands reuse the shell and skip the start.