Skip to content

test: 19 tests for hooks status derivation - #70

Merged
aterrylu merged 2 commits into
mainfrom
terry/test-session-id
Mar 26, 2026
Merged

test: 19 tests for hooks status derivation#70
aterrylu merged 2 commits into
mainfrom
terry/test-session-id

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Tests covering all agent status transitions including new SubagentStop and PostCompact handlers. Verified --session-id works via dev server (immediate claudeSessionId + persistence).

aterrylu and others added 2 commits March 25, 2026 20:58
Covers all agent status transitions:
- SessionStart → ready
- UserPromptSubmit → working
- PreToolUse → tool_running (with tool name + detail)
- PostToolUse → working (clears tool)
- Stop → idle
- Notification (permission_prompt) → needs_input
- Notification (idle_prompt) → idle
- PermissionRequest → needs_input
- SubagentStart → orchestrating
- SubagentStop → working (NEW)
- PreCompact → compacting
- PostCompact → working (NEW)
- SessionEnd → stopped
- PostToolUseFailure → error
- Unknown event → unchanged
- Unknown session → default state

Also tests notification creation for Stop/Notification events
and non-creation for PreToolUse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aterrylu
aterrylu merged commit 97d69a9 into main Mar 26, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/test-session-id branch March 26, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant