Expand description
Explicit, in-process background jobs for ctx_shell.
The MCP request may complete immediately, but the child keeps the exact timeout, allow-list, path-jail and process-group policy of foreground shell execution. Jobs intentionally live in the daemon: restarting it invalidates outstanding jobs rather than silently orphaning subprocesses.
Enums§
- Foreground
Result - Outcome of a foreground run that is allowed to detach on a soft cap.
- JobState
Functions§
- cancel
- record_
error_ telemetry_ once - Persist one aggregate for a terminal failed job, then mark that concrete
retained job instance. A later execution may reuse the content-addressed ID,
but replaces the
Joband therefore starts with a fresh marker. - run_
foreground_ or_ detach - Legacy tuple-shaped foreground result for existing callers.
- running_
count - Jobs whose command is still running. An idle MCP server with one of these is not idle: it holds the child and the output the agent will poll for.
- start
- status