Feature Description
Command Code currently supports only 3 hook events:
PreToolUse
PostToolUse
Stop
This is severely limited compared to Codex and Claude Code, which both expose a much richer hook lifecycle. The gaps prevent meaningful observability, automation, and integration with orchestration tools like herdr, tmux, and cmux.
Missing events (present in Codex):
PermissionRequest — intercept before a permission dialog
PostCompact / PreCompact — hook around context compaction
SessionStart — fire on session begin/resume
SubagentStart / SubagentStop — detect when subagents spawn/finish
UserPromptSubmit — intercept before Claude processes the prompt
Missing events (present in Claude Code, not even in Codex):
Setup — one-time prep on init
UserPromptExpansion — before slash command expands to a prompt
PermissionDenied — when auto-mode classifier denies a tool call
PostToolUseFailure — after a tool call fails (currently only success is hooked)
PostToolBatch — after a full parallel tool batch resolves
Notification — when the assistant sends a notification
MessageDisplay — while assistant message text is being displayed
TaskCreated — when a task is created via TaskCreate
Missing tool matcher support:
Command Code's supported tools table (shell, read, write, edit) also lacks matcher support for MCP tools, which both Codex and Claude Code support via mcp__* patterns.
Use Case
Without these hooks, Command Code cannot be properly integrated into multi-agent orchestration setups.
Concrete pain points today:
- herdr cannot recognize
cmd agents in tmux/cmux sessions because there is no SessionStart or SubagentStart event to listen on — the hooks to signal "an agent started" simply don't exist
- No failure visibility —
PostToolUseFailure is missing, so failed tool calls are silent
- No notification hooks — the
Notification event missing means tools like cmux cannot trigger alerts when Command Code finishes a task
- No permission interception —
PermissionRequest / PermissionDenied missing means no way to auto-approve or audit permission dialogs programmatically
- No subagent lifecycle —
SubagentStart / SubagentStop missing breaks any workflow that needs to track spawned agents
Codex and Claude Code already solved these. Command Code needs hook parity to be usable in the same workflows.
Additional Context
Reference implementations for all listed events:
Priority order for missing events (highest impact first):
SessionStart — needed for herdr/cmux agent detection
SubagentStart / SubagentStop — needed for multi-agent orchestration
Notification — needed for cmux notification triggers
PostToolUseFailure — needed for error observability
PermissionRequest / PermissionDenied — needed for auto-approval workflows
UserPromptSubmit — needed for prompt interception
PostToolBatch, MessageDisplay, TaskCreated, UserPromptExpansion, Setup — parity completion
How important is this to you?
Very important
Feature Description
Command Code currently supports only 3 hook events:
PreToolUsePostToolUseStopThis is severely limited compared to Codex and Claude Code, which both expose a much richer hook lifecycle. The gaps prevent meaningful observability, automation, and integration with orchestration tools like herdr, tmux, and cmux.
Missing events (present in Codex):
PermissionRequest— intercept before a permission dialogPostCompact/PreCompact— hook around context compactionSessionStart— fire on session begin/resumeSubagentStart/SubagentStop— detect when subagents spawn/finishUserPromptSubmit— intercept before Claude processes the promptMissing events (present in Claude Code, not even in Codex):
Setup— one-time prep on initUserPromptExpansion— before slash command expands to a promptPermissionDenied— when auto-mode classifier denies a tool callPostToolUseFailure— after a tool call fails (currently only success is hooked)PostToolBatch— after a full parallel tool batch resolvesNotification— when the assistant sends a notificationMessageDisplay— while assistant message text is being displayedTaskCreated— when a task is created viaTaskCreateMissing tool matcher support:
Command Code's supported tools table (shell, read, write, edit) also lacks matcher support for MCP tools, which both Codex and Claude Code support via
mcp__*patterns.Use Case
Without these hooks, Command Code cannot be properly integrated into multi-agent orchestration setups.
Concrete pain points today:
cmdagents in tmux/cmux sessions because there is noSessionStartorSubagentStartevent to listen on — the hooks to signal "an agent started" simply don't existPostToolUseFailureis missing, so failed tool calls are silentNotificationevent missing means tools like cmux cannot trigger alerts when Command Code finishes a taskPermissionRequest/PermissionDeniedmissing means no way to auto-approve or audit permission dialogs programmaticallySubagentStart/SubagentStopmissing breaks any workflow that needs to track spawned agentsCodex and Claude Code already solved these. Command Code needs hook parity to be usable in the same workflows.
Additional Context
Reference implementations for all listed events:
Priority order for missing events (highest impact first):
SessionStart— needed for herdr/cmux agent detectionSubagentStart/SubagentStop— needed for multi-agent orchestrationNotification— needed for cmux notification triggersPostToolUseFailure— needed for error observabilityPermissionRequest/PermissionDenied— needed for auto-approval workflowsUserPromptSubmit— needed for prompt interceptionPostToolBatch,MessageDisplay,TaskCreated,UserPromptExpansion,Setup— parity completionHow important is this to you?
Very important