Skip to content

failed state is unreachable: StopFailure is not a real Claude Code hook event #3

Description

@martinbha

Problem

The hook setup (docs/hook-setup.md) configures a StopFailure hook for both Claude Code and Codex, and the bridge script (scripts/agent-pulse-hook) maps StopFailurefailed.

Claude Code does not emit a StopFailure hook event (its documented events are SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Notification, Stop, SubagentStop, PreCompact, SessionEnd). As a result, the failed state — including its red status dot and the clearCompleted() handling — is effectively unreachable from real hook traffic. The Codex hook configuration should be verified against its actual hook support as well.

Suggested fix

  • Remove the StopFailure entries from docs/hook-setup.md (or replace with a real failure signal if one exists).
  • Decide whether the failed state should be kept (e.g. driven by a different signal) or removed from AgentState.
  • Verify the Codex config.toml hook schema in the docs actually matches what Codex supports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions