ExecuteTool
org.llm4s.agent.harness.ExecuteTool
@Experimental
object ExecuteTool
The execute tool (design ยง4.33): runs a command in a SandboxBackend, and knows nothing else about where. Through the backend, every command runs under C4's Unverifiable guard: a completed command replays its stored result, one that may have run is refused rather than run again, and a Block cannot undo what a command did (rule 5).
- '''Arguments.'''
command;workdir, a path such as/src(default/);timeout_seconds(defaultdefaultTimeout, at mostmaxTimeout). - '''Permissions.''' A call touches
ToolResource(Operation.Execute, <command>), so aPermissionMiddlewarerule matches on the command; the hints aredestructiveandopenWorld. - '''Order.''' A call holds
backend.locks(workdir)(a workspace sandbox: its whole workspace), so a batch's commands and the edits of the files they may touch apply in call order. - '''Bounds.''' Each stream is at most the backend's
maxOutputBytes, the command at mostSandboxBackend.MaxCommandBytes, the run at most the timeout; the tool itself is stoppedmaxTimeoutplus a minute in, for a sandbox that never answers.
The result is the exit code, stdout and stderr, and a note when output was cut. A refusal (by the sandbox's policy, or of a replay) is a tool error; a failure whose outcome is unknown fails the task, so recover decides it from C4's records.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ExecuteTool.type
Members list
In this article