joelclaw — CLI & Event Bus
For private addresses, accounts, ports, and host roles, see .brain/resources/operator-network-context.svx in the private dark-wizard repo and the tailnet-topology skill. Replace angle-bracket placeholders with the configured values before running commands.
The joelclaw CLI is the primary operator interface to the entire joelclaw system: event bus (Inngest), gateway, observability (OTEL), agent loops, subscriptions, and more. Built with @effect/cli, returns HATEOAS JSON envelopes.
If the CLI crashes, that's the highest priority fix.
Binary: ~/.bun/bin/joelclaw
Source: ~/Code/joelhooks/joelclaw/packages/cli/
Build: bun build packages/cli/src/cli.ts --compile --outfile ~/.bun/bin/joelclaw
Architecture
┌─ Colima VM (VZ framework, aarch64) ────────────────────────────────┐
│ Talos v1.12.4 → k8s v1.35.0 (single node, namespace: joelclaw) │
│ │
│ inngest-0 StatefulSet ports 8288 (API), 8289 (dash) │
│ redis-0 StatefulSet port 6379 │
│ typesense-0 StatefulSet port 8108 │
│ restate-0 StatefulSet ports 8080, 9070, 9071 │
│ system-bus-worker Deployment port 3111 (110+ functions) │
│ restate-worker Deployment port 9080 │
│ dkron-0 StatefulSet port 8080 │
│ minio-0 StatefulSet ports 9000, 9001 │
│ docs-api Deployment port 3838 │
│ livekit-server Deployment ports 7880, 7881 │
│ bluesky-pds Deployment port 3000 │
│ │
│ ⚠️ Inngest service named inngest-svc (not inngest) │
│ k8s auto-injects INNGEST_PORT env collision otherwise │
└─────────────────────────────────────────────────────────────────────┘
↕ NodePort on localhost
Gateway daemon (always-on pi session, Redis event bridge)
NAS "<nas>" (ASUSTOR, 10GbE NFS, 64TB RAID5 + NVMe cache)
Vault ~/Vault (Obsidian, PARA method — ADRs, system log, contacts)
Inngest event key: read from INNGEST_EVENT_KEY; do not hardcode old dev keys.
k8s manifests: ~/Code/joelhooks/joelclaw/k8s/
CLI Command Reference
Health & Status
joelclaw status # Health: server + worker + k8s pods
joelclaw jobs status # Unified runtime workload snapshot (queue + Restate + Dkron + Inngest)
joelclaw inngest status # Inngest server details
joelclaw functions # List all 110+ registered functions
joelclaw refresh # Force re-register with Inngest server
Send Events
joelclaw send "event/name" --data '{"key":"value"}'
joelclaw send "pipeline/video.requested" --data '{"url":"https://youtube.com/watch?v=XXX"}'
joelclaw send "agent/story.start" --data '{"prdPath":"/abs/path/prd.json","storyId":"S-1"}'
View Runs
joelclaw runs # Recent 10
joelclaw runs --count 20 --hours 24 # More runs, wider window
joelclaw runs --status FAILED # Just failures
joelclaw run <RUN_ID> # Step trace + errors for one run
View Events
joelclaw events # Last 4 hours
joelclaw events --prefix memory/ --hours 24
joelclaw events --prefix agent/ --hours 24
joelclaw events --count 50 --hours 48
Logs
joelclaw logs # Worker stdout (default 30 lines)
joelclaw logs errors # Worker stderr (stack traces)
joelclaw logs server # Inngest k8s pod logs
joelclaw logs server -n 50 --grep error # Filtered server errors
joelclaw logs worker --grep "observe" # Grep worker logs
Durable receipts and telemetry
The legacy joelclaw log write / slog JSONL journal is retired. Emit/query structured runtime telemetry with joelclaw otel; record durable decisions and change receipts in Brain .svx. joelclaw logs remains the runtime log read/analyze surface.
Secrets
joelclaw secrets status
joelclaw secrets lease <name> --ttl 15m
joelclaw secrets revoke <lease-id>
# Revoke only the exact leases acquired by this task.
joelclaw secrets audit --tail 50
joelclaw secrets env --dry-run
Notify
joelclaw notify send "Worker restarted and healthy" --kind receipt
joelclaw notify send "Immediate action required" --kind alert
--priority is deprecated compatibility metadata. Use --kind; the versioned routing table owns delivery.
Capability Adapter Paths (ADR-0169 phase 4)
mail, otel, recall, and subscribe now run through the CLI capability registry/adapter runtime while preserving their existing command UX and JSON envelopes.
Deploy
joelclaw deploy worker # dry-run deploy plan
joelclaw deploy worker --restart --execute # execute worker sync deployment
joelclaw deploy worker --restart --execute --force # force with active runs (disruptive)
Heal
joelclaw heal list
joelclaw heal run RUN_FAILED --phase fix --context '{"run-id":"01ABC"}' # dry-run
joelclaw heal run RUN_FAILED --phase fix --context '{"run-id":"01ABC"}' --execute # execute
Gateway
joelclaw gateway status # Gateway health + session info
joelclaw gateway events # Recent gateway events
joelclaw gateway test # Send test message through gateway
joelclaw gateway restart # Restart gateway daemon
joelclaw gateway stream # Live stream gateway events
Observer
observer is the canonical joelclaw Observer target. Do not guess panes from the default Herdr session, and do not treat it as a hidden special case. Resolve and manage it through the CLI first:
joelclaw observer status # Herdr protocol + Observer registry/session metadata
joelclaw observer resolve observer # Canonical target → named Herdr session + pane
joelclaw observer resolve dispatcher # Dispatcher pane in the Observer family
joelclaw observer cycle # Dry-run safe named-session cycle plan
joelclaw observer cycle --execute # Cycle only the named observer Herdr server, then rotate Observer
Use joelclaw observer resolve observer before scheduling or waking the Observer. If it fails with OBSERVER_TARGET_UNHEALTHY, run joelclaw observer status; if the Herdr protocol drifted, run joelclaw observer cycle --execute. joelclaw wake ... --target observer is the right wake target once resolve is healthy.
Workload Rig
joelclaw workload plan "intent" --stages-from stages.json --write-plan plan.json
joelclaw workload run plan.json --stage <stage-id> --tool pi|codex|claude
joelclaw workload dispatch plan.json --to BlueFox --from MaroonReef --send-mail
joelclaw workload sandboxes list
joelclaw workload sandboxes cleanup --expired --dry-run
joelclaw workload sandboxes janitor
Runtime truth:
workload runadmits into Redis, then Restate executes the stage throughdagOrchestrator→dagWorkerdagWorkerhandlers:shell,infer,microvminfernow runspiinside therestate-workerk8s pod with mounted auth, skills, and identity--stages-fromis the explicit stage-DAG front door; dependency gates and cycle detection are real
Async runtime monitoring in pi
The loaded pi extension at packages/pi-extensions/inngest-monitor/index.ts now exposes runtime_jobs_monitor alongside inngest_send / inngest_runs.
Use it when you want a pi session to keep watch on the ADR-0217 runtime substrate while you do other work:
runtime_jobs_monitor {"action":"start","interval":5,"report":true}— start background polling ofjoelclaw jobs statusruntime_jobs_monitor {"action":"status"}— inspect the latest runtime snapshotruntime_jobs_monitor {"action":"stop"}— stop the poller and send a final follow-up summary
The widget shows runtime health first (queue / Restate / Dkron / Inngest), then any followed Inngest runs underneath. Severity changes and meaningful workload-state changes emit OTEL and hidden follow-up messages for asynchronous report-back, so a healthy-but-now-held backlog does not stay silent.
Observability (OTEL)
joelclaw otel list --hours 1 # Recent telemetry events
joelclaw otel search "error" --hours 24 # Search OTEL events
joelclaw otel stats --hours 24 # Aggregate stats
joelclaw otel emit "action.name" --source codex --component agent-loop --success # Emit event
System Knowledge (ADR-0199)
joelclaw knowledge search "query" # Search system knowledge
joelclaw knowledge search "query" --type adr # Filter by type (adr|skill|lesson|pattern|retro|failed_target)
joelclaw knowledge sync # Re-index ADRs + skills from filesystem
joelclaw knowledge clear-failed <target> # Clear resolved failed targets
Brain/codebase patterns (browsable by agents):
ls ~/Vault/system/brain/codebase/ # List established patterns
cat ~/Vault/system/brain/codebase/<name>.md # Read a specific pattern
Subscriptions (ADR-0127)
joelclaw subscribe list # All feed subscriptions
joelclaw subscribe add <url> [--name N] # Add a feed
joelclaw subscribe remove <url> # Remove a feed
joelclaw subscribe check [--url URL] # Check feeds for new items
joelclaw subscribe summary # Summary of recent items
Agent Runtime Validation (ADR-0180)
Use this exact smoke test when validating roster dispatch end-to-end:
joelclaw agent list
joelclaw agent run coder "reply with OK" --timeout 20
joelclaw event <event-id>
Expected signal:
agent listincludes builtincoder,designer,opseventshows oneAgent Task Runwithstatus: COMPLETED- run output contains
{"status":"completed", ...}
Failure handling:
Unknown agent roster entry: codermeans runtime drift, not prompt failure.- Deploy latest
system-bus-worker - Restart host worker process
- Re-run the same 3-step smoke
- If Inngest API is unreachable (
localhost:8288), recover local control-plane first (Colima/Talos), then retry validation.
Brain-backed Recall
joelclaw recall "query about past context" # Search disposable Brain + observation projections
Brain .svx pages remain canonical. The Typesense observations and brain_graph_nodes collections are rebuildable projections, not a second memory store.
Discovery
joelclaw discover "https://example.com" --context "why this is interesting"
Agent Loops
# Start a loop
joelclaw loop start --project ~/Code/joelhooks/joelclaw \
--goal "Implement feature X" \
--context ~/Vault/docs/decisions/0XXX.md \
--max-retries 2
# Start with existing PRD
joelclaw loop start --project PATH --prd prd.json --max-retries 2
# Monitor
joelclaw loop status <LOOP_ID>
joelclaw loop status <LOOP_ID> -c # Compact: one line per story
joelclaw loop status <LOOP_ID> -v # Verbose: criteria, output paths
joelclaw watch <LOOP_ID> # Live: polls 15s, exits on completion
joelclaw watch # Auto-detects active loop
# Management
joelclaw loop list # All loops in Redis
joelclaw loop cancel <LOOP_ID> # Stop + cleanup
joelclaw loop nuke dead # Remove completed loops from Redis
Other Commands
joelclaw sleep [on|off|status] # Sleep mode for gateway
joelclaw note <text> # Quick note to Vault
joelclaw vault read <ref> # Resolve/read ADR/project/path refs
joelclaw vault search <query> # Search vault markdown
joelclaw vault adr list # ADR inventory (optionally by status)
joelclaw vault adr collisions # ADR number collision report
joelclaw vault adr audit # ADR health + collision + index checks
joelclaw vault adr rank # ADR NRC+novelty ranking
joelclaw skills audit [--deep] # On-demand skill garden report
joelclaw search <query> # Full-text search
joelclaw email [scan|triage] # Email operations
joelclaw x [post|mentions] # X/Twitter operations
joelclaw nas [status|health] # NAS operations
joelclaw diagnose <topic> # System diagnosis
joelclaw usage [--source router|agents|all] # Token usage + cost from ClickHouse
joelclaw deploy worker [--restart] [--execute]
joelclaw heal [list|run]
joelclaw inngest sync-worker [--restart] # Worker lifecycle