Loading the documentation…
A terminal session gives DataMind Oda six actions: open, send, read, signal, close and list. This page covers what each one returns, with the notes, markers, limits and refusals to expect.
The sessions themselves are on Terminal sessions, the shell and sandbox behind them on Terminal shells and sandboxing, and the rows and cards in the chat on Commands Oda runs.
terminal_open). Oda starts a session of a type, usually the shell, and can give it a name such as main or gdb. The result reads started terminal session pty-1 [type: shell], carries the session's id, type, status and process id when the shell has one, and a short startup message (or (no startup output)).terminal_send). Oda writes text into the session and waits for it to settle. By default the text ends with Enter; for control characters or an incomplete line in an interactive program, Oda sends the text without pressing Enter. A send that is stopped before it settles reports terminal send aborted.terminal_read). Oda reads the output the session has kept, starting at the beginning and 500 lines at a time by default. A read can also start at a later line; a start before the beginning, or a count below one line, is refused.terminal_signal). Oda sends SIGINT, SIGTERM, SIGKILL, SIGTSTP or SIGHUP to what is running in the session. The result reads delivered <signal> to foreground process group <pgid>. A SIGKILL aimed at the shell itself is refused; Oda closes the session instead.terminal_close). Oda ends the session, its shell and everything running in it. Closing is safe to repeat: the result reads closed terminal session <id>, or terminal session <id> was already closing when it was already on its way out.terminal_list). Oda lists the sessions it holds, one per line: the id, the name in parentheses when set, the type in brackets, the status, and the process id when there is one, for example pty-1 [shell] running. With none, the result reads (no terminal sessions).type opens a session of that type; the type the app ships is shell.name is optional, a display name such as main or gdb, unique per chat.submit on a send defaults to true, so the text ends with Enter; false writes the text alone.offset and count on a read default to 0 and 500; the start must be a whole number not below zero, and the count a whole number of at least one.signal takes the five signals above.run_in_background on a send runs it as a job instead of waiting.Every result is text and bounded: 256 KiB (262,144 bytes) by default, and the cap is never set below 64 bytes. A result over the cap is cut at a character boundary and marked [output truncated]; the earlier part is kept.
| Note | What it means |
|---|---|
(no startup output) | The session started with nothing to show yet. |
(no new output) | A send had nothing new to show; output you already read is not repeated. |
[wait: <reason>] | Why a wait ended: one of stdin_read, inferred_idle, timeout or session_exit. What each reason means is on Terminal sessions. |
[session: running] | The session is still open after the wait. |
[session: exited code=<code> signal=<signal>] | The shell ended during the wait; the note carries its exit code, the signal that ended it, or null where there is none. |
(no retained output) | The session had nothing kept to read. |
[lines: <first>-<last> of <total>] | Which lines of the kept output a read returned, and how many lines are kept in all. |
[output truncated] | The result was cut to fit; the earlier part is kept. |
(no terminal sessions) | The list found no sessions Oda holds. |
A result stays in the chat's history like any other tool result, until the chat compacts; see Chat compaction.
started background job <id>; the job is labelled with the session's id and the text sent.killed.run_in_background is not offered on the tool and a call that asks for it anyway is refused; a build without background job support refuses background sends the same way.Open terminal . . ., Read terminal . . ., Signal terminal . . ., Close terminal . . . and List terminal sessions.Send to terminal . . . in background.started terminal session pty-1 [type: shell]. What does it mean?Oda opened a terminal session. pty-1 is the session's id, which Oda uses to tell sessions apart, and [type: shell] is the session's type, here the shell. The result also carries a short startup message; when there is none, it says (no startup output).
(no new output). Why?The send settled without producing anything new to show, so there was nothing to add to the result; output you already read is not repeated. If you expected fresh output, have Oda read the session again, and check the wait and session notes for how it ended.
code and signal mean in a session note?They say how the shell ended. code=2 signal=null means it exited with code 2; code=null signal=SIGTERM means a signal ended it; when both read null, it ended without reporting a code or a signal. While the session is still open, the note simply reads [session: running].
[output truncated]?The full result was longer than the size cap (256 KiB by default). Oda cuts it at a character boundary and keeps the earlier part, and the marker shows where text was left out. When you need the rest, ask Oda to read further.
Yes. A read names a start and a count; by default it starts at the beginning of the kept output and returns up to 500 lines. A start before the beginning, or a count below one line, is refused.
(no retained output). Why?The session had nothing kept to return: it had not produced output yet, or what it had kept was already dropped. Once the session produces output, the next read returns it.
SIGINT, SIGTERM, SIGKILL, SIGTSTP and SIGHUP. The result reads delivered <signal> to foreground process group <pgid>, so you can see the signal and what received it. A SIGKILL aimed at the shell itself is refused; Oda closes the session instead.
By reading the job the send started. Each read continues from where the previous one stopped, so nothing is shown twice, and a read taken before the send starts comes back empty rather than failing. Stopping the job ends the send, and the job then reads killed.
It sets submit to false on the send. The text is then written alone, which is what control characters and incomplete input in an interactive program need; by default the text ends with Enter.
A foreground send appears as a terminal card; the other actions appear as generic tool cards titled Open terminal ., Read terminal ., Signal terminal ., Close terminal . and List terminal sessions. A background send is titled Send to terminal ..
The send ends before it settles; a foreground send then reports terminal send aborted. The session itself stays open, ready for the next action.
Background sending is available by default. Where it is turned off, run_in_background is not offered on the send tool and a call that asks for it anyway is refused, so Oda sends in the foreground. A build without background job support refuses background sends the same way.