Operations Runbook
Step-by-step procedures for the recurring operations. Each procedure is a self-contained section that can be followed without reading the rest of the documentation.
Purpose
This runbook is the operator's reference. It is written for the human who needs to fix something, restart something, or verify that something is working. Each procedure is a self-contained section with the prerequisites, the steps, the expected output, and the recovery if the procedure fails.
The cheatsheet companion is in Cheatsheet; the health checks are in Health Checks.
Conventions
- All paths use the placeholder
{workspace-root}. The real path is the operator's workspace root. - All commands assume a POSIX shell. On macOS and Linux, this is the default.
- Commands that are destructive are marked with
[DESTRUCTIVE]. They require explicit confirmation. - Procedures assume the operator has shell access to the host.
State review
Verify the health of all gateways, sessions, and tools.
Procedure
-
Check the Coordinator gateway:
Expected output: a JSON document with
"status": "ok". -
Check the Research Worker gateway:
Expected output: a JSON document with
"status": "ok". -
Check the Media Agent gateway:
Expected output: a JSON document with
"status": "ok". -
List active sessions:
Expected output: a list of session IDs and their states.
-
List in-flight research missions:
Expected output: a list of mission folders. Each folder has a
phase.jsonwith a non-terminal state, or is archived (terminal state).
Recovery
If a gateway is not responding, see the recovery procedure for the specific gateway below.
Session resume
Continue previous work without losing context.
Procedure
-
Identify the session to resume:
-
Resume the session:
-
Verify the session is active:
Recovery
If the session cannot be resumed, the most common cause is that the underlying process has crashed. Restart the gateway and try again.
Worker recovery
Restart the Research Worker after a crash or after a configuration change.
Procedure
-
Identify the supervisor:
- On macOS:
launchdwith the LaunchAgent~/Library/LaunchAgents/{worker-launchagent-label}.plist. - On Linux:
systemdwith the unit{worker-systemd-unit}.service.
- On macOS:
-
On macOS:
The
-kflag kills the current process (if any) and restarts it.KeepAlive=trueensures the supervisor restarts the process if it crashes. -
On Linux:
-
Verify the worker is up:
Expected output: a JSON document with
"status": "ok". -
Verify no missions are stuck:
Expected output: a list of in-flight missions. If the list is empty, all missions are in a terminal state.
Recovery
If the worker does not start:
- Check the log file:
- macOS:
tail -f /Users/{user}/.openclaw-scout/logs/gateway.log - Linux:
sudo journalctl -u {worker-systemd-unit}.service -n 100
- macOS:
- Common issues:
- Port already in use. Identify and kill the conflicting process.
- Configuration error. Validate the configuration file.
- Missing dependencies. Install them.
If a mission is stuck in a non-terminal state, see Research Mission Lifecycle → Recovery.
Media Agent recovery
Restart the Media Agent after a crash or after a configuration change.
Procedure
- Identify the supervisor (same as the worker).
- Restart the process:
- On macOS:
- On Linux:
- On macOS:
- Verify the agent is up:
Coding Assistant invocation
Run the Coding Assistant non-interactively to delegate a specific implementation or analysis task.
Procedure
The Coding Assistant is invoked through a scoped prompt. The exact invocation is framework-specific; the documented requirements are:
- The prompt describes the goal and the boundaries, not the implementation.
- The prompt references the relevant
AGENTS.md,SKILL.md, andTOOL.mdfiles. - The invocation has the trust level required for the
task:
read-onlyfor read-only inspection.workspace-writefor code changes within the workspace.- Full trust for tasks that require production access (rare; only with explicit user authorization).
Example invocation (illustrative):
The prompt file is the implementation prompt described in Coding Assistant → Workflow.
Test suite
Run the test suite for a project.
Procedure
-
Change to the project directory:
-
Install dependencies (if not already installed):
-
Run the tests:
-
Verify the test output:
- All tests pass.
- The coverage report is at or above the project's minimum (typically 70%).
Audit review
Review the audit log for the past period.
Procedure
-
List the audit reports for the period:
-
Open the most recent report:
-
For each finding, check:
- Is the finding still valid?
- Has it been resolved?
- Is the severity still accurate?
-
Update the report with the current state.
-
If new findings are identified, add them to Failure Catalog.
Backup
Back up the workspace.
Procedure
-
Verify the backup destination is available:
-
Run the backup script:
-
Verify the backup:
The most recent entry should be the backup just created.
-
Verify the backup integrity:
Recovery
If the backup fails:
- Check the disk space on the backup destination.
- Check the permissions on the backup destination.
- Check the script's log for the specific error.
If the backup is corrupted, restore from the previous backup and document the incident in the audit log.
Browser recovery
Recover the browser instance when it crashes or stops responding.
Procedure
-
Close all browser instances:
-
Start a new browser instance:
-
Verify the browser is responsive:
Retention
Archive old research missions to cold storage.
Procedure
-
Identify missions older than the retention period (default 90 days):
-
Verify the cold storage is available:
-
Archive the missions:
-
Verify the archive:
-
Remove the archived missions from the workspace:
Confirm with the user before running this command.
Coding Assistant killed by timeout
The Coding Assistant process is killed by the OS (SIGKILL)
when its task or prompt is too large. The typical symptom
is a log line containing killed and a return code of
137.
Symptoms
- The Coding Assistant exits with code 137.
- The log shows
Killednear the end of the run. - No artifacts or partial output in the workspace.
Procedure
- Do not write the code by hand. The Coding Assistant recovery rule is absolute. Stop and recover the assistant before doing anything else.
- Identify the task that killed the assistant. It is usually the largest file or the most complex phase.
- Split the task into smaller prompts. The recommended rule: one file per prompt. Smaller prompts have lower memory and lower latency.
- Re-run with a longer timeout (recommended:
120-180sfor small tasks). - If the assistant still dies, consider a more aggressive split: header-only file first, then implementation, then tests.
Recovery
If the Coding Assistant cannot be recovered after three attempts with progressively smaller prompts, stop and ask the operator for help. The operator may need to adjust the environment (memory, swap) or use a different execution path.
Model quota exhausted
The model's text quota is exhausted. The symptom is a
429 or a quota_exceeded error from the model
provider. The Text quota is on a 5-hour rolling window;
voice, image, and music quotas are daily.
Symptoms
- The model returns a 429 or a
quota_exceedederror. - The Coordinator's health probe reports
quota_exhausted: true. - The quota tracking file shows a non-zero usage percentage.
Procedure
- Identify which quota is exhausted (text, voice, image, music) by reading the model provider's response.
- For the text quota, wait for the 5-hour rolling
window to reset. The reset time is reported by the
provider. During the wait:
- The Coordinator should not initiate new text requests.
- Background tasks should pause.
- The user can be informed that the assistant is in a "quota cooldown" state.
- For the voice, image, or music quota, wait for the daily reset.
- If a critical task is in flight, consider switching to an alternative model (if configured) or to a fallback execution path (e.g., run a CLI tool directly).
Recovery
When the quota resets:
- Verify the reset by running a minimal text request.
- Resume the in-flight tasks.
- Update the quota tracking file with the new usage.
- If the quota reset time is not honored, log the incident and consider rotating the API key.
Token pool: all tokens exhausted
All tokens in the research framework's Perplexity token
pool are marked quota_exhausted. The symptom is a
failed_terminal on the P3 phase with the error
no_tokens_available.
Procedure
- Read the token pool state file:
- Identify which tokens are exhausted and which (if any) are still active.
- Wait for the exhausted tokens to reset. Perplexity quotas reset daily.
- If the wait is unacceptable, add a new token to the
pool:
- Edit
{framework-root}/config/token_pool_config.json. - Add the new token entry.
- Reload the pool (the framework reloads on every request; no restart needed).
- Edit
- Verify the new token is in use by reading the journal
and looking for the new token's
namefield.
Recovery
If the operator cannot add a new token, disable P3 for
the affected missions. The DAG handles P3 being absent
(phases that need synthesis.json will be marked
blocked_missing_input).
Browser CDP target detached
The browser automation loses its connection to the
Chromium DevTools Protocol. The symptom is an error
containing Target.detached or connection refused on
the CDP port (default 18800).
Symptoms
- Browser actions return
connection refusedorTarget.detached. - The Coordinator cannot take a snapshot.
- The browser tab is still open but unreachable.
Procedure
- Check if the browser process is still running:
- If the process is not running, restart the browser:
- If the process is running but not responding, kill it
and restart:
- Verify the new browser is responsive by taking a snapshot of a known URL.
Recovery
If the browser repeatedly detaches:
- Check the host's resources (memory, CPU).
- Check for conflicting browser instances.
- Consider switching to a fresh profile.
- Document the incident in the audit log.
Media Lab Server not responding
The Media Lab Server (image and music generation) is not
responding on 127.0.0.1:8765. The symptom is a
connection refused or a timeout on the API.
Procedure
- Check if the server process is running:
- If not running, start it:
- Verify the server is up:
- If the server is running but not responding, check the log for the most recent error.
- If the server repeatedly fails, check the output directory's disk space and permissions.