Expand description
Background shell processes for long-running commands.
bash with run_in_background: true starts a host process (dev server,
file watcher, long test suite) and returns immediately with an id. The
bash_output tool returns output produced since the previous read plus the
exit status, and bash_kill stops the process. Processes are scoped to the
session that started them. The registry belongs to a ToolRegistry, so
every process still running is killed when that registry is dropped.
Structs§
- Background
Job - A background process as listed for the user (
/jobs). - Bash
Input Tool - Write to a background process’s stdin: answer prompts, drive a REPL or an
interactive CLI started with
run_in_background. - Bash
Kill Tool - Bash
Output Tool - Process
Registry - Background processes started through one tool registry.
Enums§
- Foreground
Outcome - How a foreground command run through the registry ended.
Functions§
- session_
key - Session key used to scope background processes to the chat that owns them.
- session_
key_ for - The session key of one chat (see
session_key).