Module shell

Module shell 

Source
Expand description

2026-09-26: Running the shell command the model wrote, and bounding its time, memory and output.

Owner: bench, agentic. Invariants:

  • Each command runs as sh -c with the sandbox as its working directory and, on unix, in its own process group.
  • While a command runs, at most 2 * CAPTURE_END bytes of each stream are held.
  • truncate returns at most MAX_TOOL_OUTPUT bytes.

Functionsยง

truncate
2026-09-26: Keep the head and tail of text longer than MAX_TOOL_OUTPUT bytes, with a note giving the elided length in bytes. The result is at most MAX_TOOL_OUTPUT bytes, so truncating it again returns it unchanged.