Skip to content

Cleanup: Remove per-harness lifecycle hooks — agentctl webhooks are the single source #124

@c-h-

Description

@c-h-

Context

agentctl#108 + PR #123 added native lifecycle webhook emission. agentctl now emits session.stopped webhooks when any harness (Claude Code, OpenCode, Codex) stops.

Current state (messy)

Three separate event sources feeding OrgLoop:

  1. Claude Code stop hook (~/.claude/settings.jsonorgloop hook claude-code-stop) — per-harness
  2. OpenCode lifecycle plugin (~/.config/opencode/plugins/orgloop-lifecycle.ts) — per-harness
  3. agentctl webhook (AGENTCTL_WEBHOOK_URL) — unified, NEW

Plus three OrgLoop sources (opencode, claude-code, agentctl) and three routes all pointing to the same SOP.

Target state (clean)

  1. Delete Claude Code stop hook from ~/.claude/settings.json (the orgloop hook claude-code-stop entry)
  2. Delete OpenCode lifecycle plugin at ~/.config/opencode/plugins/orgloop-lifecycle.ts
  3. Delete opencode and claude-code sources from OrgLoop connector config
  4. Delete coding-agent-supervisor and claude-code-supervisor routes from OrgLoop
  5. Keep only the agentctl source and agentctl-supervisor route

Verification

After cleanup, stop a Claude Code session and verify:

  • agentctl daemon emits webhook to OrgLoop
  • OrgLoop receives it on agentctl source
  • Supervisor SOP fires

Blocked on

Confirming agentctl webhooks actually fire reliably for Claude Code sessions. The webhook emission path needs E2E testing before we delete the fallback hooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions