feat: callback metadata, lifecycle webhooks, spawn ENOENT retry#123
Merged
feat: callback metadata, lifecycle webhooks, spawn ENOENT retry#123
Conversation
- #104: Add --callback-session and --callback-agent CLI flags to launch. Stored in session.meta as openclaw_callback_session_key / openclaw_callback_agent_id. Propagated through daemon launch, multi-adapter orchestration, and surfaced in list/status --json output. - #108: Native lifecycle webhook emission from daemon. Reads webhook_url and webhook_secret from config (~/.agentctl/config.json) or env vars (AGENTCTL_WEBHOOK_URL, AGENTCTL_WEBHOOK_SECRET). On running→stopped transitions POSTs {hook_type, session_id, cwd, adapter, duration_seconds, exit_status, summary, meta, timestamp} with HMAC-SHA256 signature. Fire-and-forget across all detection paths (session.stop, reconcile, PID liveness cleanup). - #120: Spawn ENOENT retry. All adapter launch() methods now use spawnWithRetry() which on ENOENT waits 500ms, calls clearBinaryCache(), re-resolves the binary path, and retries once. Fixes #104, Fixes #108, Fixes #120 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c-h-
pushed a commit
that referenced
this pull request
Mar 10, 2026
Features: - Phase 1 ACP adoption — Codex adapter via ACP transport (#127) - Callback metadata + lifecycle webhooks (#123) - ADR-001: adopt ACP as primary agent interface (#126) - Stateless daemon core (#117) Fixes: - Eliminate pending- session IDs — resolve real ID at launch (#131) - Webhook numeric exit_status + compatible HMAC headers (#128) - Daemon env derivation at spawn time (#119) - Binary resolve util update (#121) Docs: - Full documentation audit and alignment (#132)
c-h-
added a commit
that referenced
this pull request
Mar 10, 2026
Features: - Phase 1 ACP adoption — Codex adapter via ACP transport (#127) - Callback metadata + lifecycle webhooks (#123) - ADR-001: adopt ACP as primary agent interface (#126) - Stateless daemon core (#117) Fixes: - Eliminate pending- session IDs — resolve real ID at launch (#131) - Webhook numeric exit_status + compatible HMAC headers (#128) - Daemon env derivation at spawn time (#119) - Binary resolve util update (#121) Docs: - Full documentation audit and alignment (#132) Co-authored-by: Doink (OpenClaw) <charlie+doink@kindo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the core agentctl side of the coding-agent completion boomerang pattern — enabling completion events to route back to the originating OpenClaw session.
Changes
#104 — Callback session metadata
--callback-session <key>and--callback-agent <id>CLI flags onagentctl launchsession.metaasopenclaw_callback_session_key/openclaw_callback_agent_idlist --json,status --jsonoutput#108 — Native lifecycle webhook emission
webhook_url+webhook_secretfrom~/.agentctl/config.jsonor env vars{hook_type, session_id, cwd, adapter, duration_seconds, exit_status, summary, meta, timestamp}#120 — Spawn ENOENT retry
spawnWithRetry()utility used by all adapter launch methodsTests
webhook.test.ts(10 tests),spawn-with-retry.test.ts(3 tests)Fixes #104, Fixes #108, Fixes #120