Skip to content

Record empty stop hook payloads#207

Merged
Siddhant-K-code merged 1 commit into
mainfrom
fix/record-empty-stop-hooks
Jun 11, 2026
Merged

Record empty stop hook payloads#207
Siddhant-K-code merged 1 commit into
mainfrom
fix/record-empty-stop-hooks

Conversation

@Siddhant-K-code

Copy link
Copy Markdown
Owner

Summary

  • Record stop hook markers even when the provider does not include assistant text.
  • Preserve stop/session-end metadata such as stop_reason, reason, transcript_path, cwd, and hook_event_name.
  • Generate Copilot's documented Stop hook and add SessionEnd for Copilot CLI.
  • Add an explicit Cursor stop hook alongside afterAgentResponse.
  • Add aliases for camelCase/PascalCase provider event names.
  • Bump patch version to 0.80.1.

Context

Provider stop hooks are not guaranteed to carry assistant text. Copilot's documented stop payload is metadata-oriented (transcript_path, stop_reason), so the previous handle_stop early return made real emitted stop hooks look like they never fired. This does not force providers to emit stop hooks for every UI action, but it records the hook whenever the provider sends it.

Verification

  • python3 -m pytest tests/test_hooks.py tests/test_copilot_hooks.py tests/test_cursor_hooks.py tests/test_codex_hooks.py tests/test_gemini_hooks.py -q -> 51 passed
  • python3 -m compileall -q src/agent_trace && git diff --check
  • python3 -m pytest tests/ -q -> 1604 passed
  • python3 -m agent_trace.cli --version -> agent-strace 0.80.1

Co-authored-by: Codex <noreply@openai.com>
@Siddhant-K-code Siddhant-K-code added the bug Something isn't working label Jun 11, 2026
@Siddhant-K-code Siddhant-K-code merged commit a564cb1 into main Jun 11, 2026
4 checks passed
@Siddhant-K-code Siddhant-K-code deleted the fix/record-empty-stop-hooks branch June 11, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant