From 7c2957e777a85b8ad97f3b9491e3fa9bbd341deb Mon Sep 17 00:00:00 2001 From: "Doink (OpenClaw)" Date: Mon, 9 Mar 2026 14:37:35 -0700 Subject: [PATCH 1/2] docs: audit and align documentation with current codebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: add missing launch options (--file, --max-file-size, --callback-session, --callback-agent, --worktree, --branch), fix hook timeout (60s → 300s), rewrite fuse section as generic (remove Kind-specific references per ADR-003), fix Prometheus metrics (fuses_fired_total → fuses_expired_total, remove kind_clusters_deleted_total), update project structure (remove merge.ts, add ACP adapter files), add Codex ACP / generic ACP / Pi Rust adapter sections, add webhook documentation, update architecture description for stateless daemon model - CHANGELOG: add v1.6.0 entry (ACP adoption, webhooks, callback metadata, spawn ENOENT retry) - Decision 001: update status Proposal → Implemented, mark matrix files as shipped, update adapter count - Decision 004: update status Proposed → Accepted (Phases 1-3 implemented in v1.4.0), label old architecture as "Previous", mark migration phases 1-3 as complete Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 17 ++ README.md | 147 +++++++++++++----- .../001-parallel-multi-adapter-launch.md | 9 +- docs/decisions/004-stateless-daemon-core.md | 14 +- 4 files changed, 133 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9148776..70983d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [1.6.0] - 2026-03-09 + +### Added + +- Phase 1 ACP adoption — Codex adapter via ACP transport (#125, #127) +- Lifecycle webhooks for `session.stopped` payloads (#123) +- Callback metadata (`--callback-session`, `--callback-agent`) for orchestration (#123) +- Spawn ENOENT retry for adapter launch resilience (#123) + +### Fixed + +- Webhook emit numeric `exit_status` + compatible HMAC headers (#128) + +### Docs + +- ADR-001: adopt ACP as primary agent interface (#126) + ## [1.5.0] - 2026-02-26 ### Added diff --git a/README.md b/README.md index 6471e37..ce21d8f 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,11 @@ Universal interface for supervising coding agents. Launch, monitor, resume, inte agentctl reads from native sources (Claude Code's `~/.claude/` directory, Pi's `~/.pi/` directory, running processes) and provides a standard control plane to list, inspect, stop, launch, and resume agent sessions. It never replicates state — it reads what's actually happening. -## Layer Model +## Design Philosophy -| Layer | Role | -|-------|------| -| **agentctl** | Read/control interface. Discovers sessions, emits lifecycle events. | -| **OrgLoop** | Routes lifecycle events to mechanical reactions (cluster fuse, notifications). | -| **OpenClaw** | Reasoning layer. Makes judgment calls about what to do. | +agentctl intentionally does **not** maintain its own session registry — it reads native agent sources and cross-references running processes. The daemon tracks only launch metadata, directory locks, and fuse timers. This keeps agentctl grounded in what is actually running, not a shadow copy that drifts out of date. -agentctl intentionally does **not**: -- Maintain its own session registry (reads native sources) -- Have a hook/reaction system (that's OrgLoop) -- Make judgment calls about what to do (that's OpenClaw) +agentctl provides lightweight operational hooks (lifecycle hooks, webhooks) for reacting to session events, but leaves higher-level judgment — what to do about a failed run, whether to retry, how to route work — to systems above it. ## Why agentctl? @@ -23,7 +16,7 @@ You can use `claude code` (or any agent CLI) directly — agentctl is not a repl The practical value is simple: launch work, see what's running, resume interrupted sessions, stop the ones that went sideways, and compare outcomes across adapters without learning a different control surface for each one. That operator UX matters whether the supervisor is a human juggling multiple sessions or another agent coordinating work on your behalf. -What it adds today: session discovery across running agents, lifecycle tracking that persists session info even after processes exit, a daemon with directory locks to prevent duplicate launches on the same working directory, fuse timers for automated resource cleanup, and a standard interface that works the same regardless of which coding agent is underneath. The adapter model means support for additional agent runtimes can be added without changing the CLI or daemon interface. +What it adds today: session discovery across running agents, lifecycle tracking that persists session info even after processes exit, a daemon with directory locks to prevent duplicate launches on the same working directory, fuse timers for automated resource cleanup, webhooks for external integrations, and a standard interface that works the same regardless of which coding agent is underneath. The adapter model means support for additional agent runtimes can be added without changing the CLI or daemon interface. The bigger idea is modest but useful: agentctl is a universal control plane for coding agents. It focuses on the operational layer — launch, monitor, resume, interrupt, compare — while leaving native execution to each adapter and higher-level judgment to systems above it. @@ -65,6 +58,9 @@ agentctl launch -p "Read the spec and implement phase 2" # Launch in a specific directory agentctl launch -p "Fix the auth bug" --cwd ~/code/mono +# Launch with context files +agentctl launch -p "Implement the feature" --file spec.md --file examples.ts + # Launch a new Pi session agentctl launch pi -p "Refactor the auth module" @@ -149,8 +145,9 @@ Array values in `model` are expanded via cross-product. ```bash agentctl list [options] - --adapter Filter by adapter (claude-code, codex, opencode, pi, pi-rust, openclaw) + --adapter Filter by adapter (claude-code, codex, codex-acp, opencode, pi, pi-rust, openclaw) --status Filter by status (running|stopped|idle|error) + --group Filter by launch group (e.g. g-a1b2c3) -a, --all Include stopped sessions (last 7 days) --json Output as JSON @@ -158,18 +155,29 @@ agentctl status [options] --adapter Adapter to use --json Output as JSON -agentctl peek|logs [options] +agentctl peek [options] -n, --lines Number of recent messages (default: 20) --adapter Adapter to use +agentctl logs [options] + -n, --lines Number of recent messages (default: 50) + --adapter Adapter to use + agentctl launch [adapter] [options] -p, --prompt Prompt to send (required) --spec Spec file path + --file File to include in context (repeatable) + --max-file-size Max file size in bytes (default: 51200) --cwd Working directory (default: current directory) --model Model to use (e.g. sonnet, opus) --adapter Adapter to launch (repeatable for parallel launch) --matrix YAML matrix file for advanced sweep launch - --group Filter by launch group (for list command) + --worktree Auto-create git worktree for isolation + --branch Branch name for worktree + --on-create