[Bug] claude-agent-acp 0.64.0 never emits SessionEnd — user SessionEnd hooks silently dead for all Buzz-managed Claude sessions since 0.5.17
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Summary
Since Buzz 0.5.17 (~2026-08-18), Claude agent sessions launched through the bundled `@agentclientprotocol/claude-agent-acp` harness never emit the Claude Code **`SessionEnd` hook event**. Any user automation wired to `SessionEnd` in `~/.claude/settings.json` (session summarizers, cleanup, memory pipelines) silently stops running for all Buzz-managed Claude sessions.
## Environment
- Buzz.app 0.5.18, macOS (Darwin 25.5.0, Apple Silicon)
- `node-tools/lib/node_modules/@agentclientprotocol/claude-agent-acp` **0.64.0**
- User hooks configured in `~/.claude/settings.json` (`SessionStart`, `SessionEnd`, `Stop`)
## What works vs. what doesn't
- `SessionStart` hooks **do** fire inside Buzz Claude sessions (the harness passes `settingSources: ["user", "project", "local"]`, and we see the hook's injected context in-session). So user settings/hooks are loaded correctly.
- Transcripts are written normally under `~/.claude/projects/-Users---buzz/*.jsonl`.
- `SessionEnd` **never** fires. Our `SessionEnd` hook logs every invocation; the last entries with Buzz transcripts are from 2026-08-18 13:39 (pre-0.5.17, batches matching graceful app quits). Since then: 190+ Buzz Claude sessions, zero `SessionEnd` invocations with a transcript path. The few stray invocations that do arrive have an **empty/missing `transcript_path`** in the payload.
- Control group: Codex agents inside the same Buzz app still trigger their own end-of-session hooks — only the Claude ACP path is affected.
## Likely cause
`claude-agent-acp/dist/acp-agent.js` (0.64.0) has no session-teardown path that lets the SDK/CLI reach its clean-exit `SessionEnd` emission: grep shows **zero** occurrences of `SessionEnd` handling, and sessions appear to be terminated by killing the subprocess (app quit / agent stop) rather than ending the session gracefully. Pre-0.5.17 behavior did produce `SessionEnd` on app quit.
## Expected
When a Buzz-managed Claude session ends (channel session stopped, agent stopped, app quit), the harness should end the SDK session gracefully so the standard `SessionEnd` hook fires with a valid `transcript_path` — matching standalone Claude Code CLI behavior.
## Impact
Silent breakage of user-side `SessionEnd` automations for every Claude session managed by Buzz. No error surfaced anywhere; discovered only by auditing hook logs.
Happy to provide hook logs or test a build. (Same reporter as #6544.)
Contributor guide
Assessment
This issue has not been assessed yet.