Keeps this page in sync as the body changes. Pause it any time for a quieter view.
Path /specs/agent-execution-lifecycle-hooks
Last refresh never
Spec: Agent Execution Lifecycle Hooks
inventory_source local | spec_api /api/spec-registry/agent-execution-lifecycle-hooks | registry_updated 2026-04-09T03:10:08.801506Z
potential_value 0.00 | actual_value 1.00 | value_gap 0.00
estimated_cost 0.00 | actual_cost 1.00 | cost_gap 1.00
estimated_roi 0.00 | actual_roi 1.00
Missing contributor linkage. Submit a change request with contributor attribution.
Open process view for this spec
task_ids -
branches -
source_files specs/agent-execution-lifecycle-hooks.md, specs/unified-agent-cli-flow-patch-on-fail.md
evidence_refs -
Open implementation view for this spec
implementation_refs spec-registry:agent-execution-lifecycle-hooks, spec-registry:unified-agent-cli-flow-patch-on-fail
lineage_ids -
public_endpoints -
summary Adopt a hook-first execution pattern for Coherence agent tasks so task lifecycle transitions are emitted through a consistent internal interface. This brings the same orchestration clarity seen in oh-my-opencode (centralized lifecycle events + safe listeners) while keeping Coherence execution deterministic and observable.
process_summary Add an execution lifecycle hook surface that can dispatch named lifecycle events for a task.; Ensure hook listener failures never break task execution or change task terminal status.; Emit lifecycle telemetry events during task execution (`claimed`, `execution_started`, `finalized`, plus block/validatio; Add configurable lifecycle subscribers (`runtime` and `jsonl`) that can be enabled/disabled via environment setting.; Add a compact lifecycle summary query endpoint for recent lifecycle events.
pseudocode_summary -
implementation_summary api/app/services/agent_execution_hooks.py (register_lifecycle_hook(), dispatch_lifecycle_event()); api/app/services/agent_execution_hooks_config.py (hook configuration); api/app/services/agent_execution_task_flow.py (_emit_lifecycle_event())