6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
1.4 KiB
Background Exec and Process Tool
Overview
OpenClaw provides two complementary tools for managing shell commands and long-running tasks:
exec tool handles command execution with automatic backgrounding capabilities, while the process tool manages those background sessions.
exec Tool Features
Key parameters include command (required), yieldMs (10000ms default for auto-backgrounding), background flag for immediate backgrounding, and configurable timeout (1800 seconds default).
The tool supports TTY allocation via pty: true, working directory specification, environment variable overrides, and elevated mode execution when permitted.
Execution Behavior
Foreground commands return output immediately. When backgrounded, the tool responds with status: "running", a session ID, and recent output tail. Output remains in memory until polled or cleared.
process Tool Actions
Available operations include:
list: display running and finished sessionspoll: retrieve new output and exit statuslog: read aggregated output with offset/limit supportwrite: send stdin datakill: terminate a sessionclear: remove finished sessionsremove: terminate or clear sessions
Key Limitations
Sessions exist only in memory and are lost upon process restart. The tool is scoped per agent and only tracks that agent's sessions. Session logs enter chat history only when explicitly polled and recorded.