fix: use correct hook field name last_assistant_message

The Claude Code Stop hook sends `last_assistant_message`, not
`assistant_message`. This was causing response_chars=0 on all
captured interactions. Also removes the temporary debug log block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 09:17:21 -04:00
parent 2d911909f8
commit 92fc250b54
2 changed files with 4 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ class TestCapture:
"cwd": "C:\\Users\\antoi\\ATOCore",
"permission_mode": "default",
"hook_event_name": "Stop",
"assistant_message": "Here is the answer to your question about the code.",
"last_assistant_message": "Here is the answer to your question about the code.",
"turn_number": 3,
}
data.update(overrides)
@@ -215,7 +215,7 @@ class TestCapture:
mock_urlopen.return_value = mock_resp
with mock.patch("sys.stdin", StringIO(
self._hook_input(transcript_path=transcript, assistant_message=long_response)
self._hook_input(transcript_path=transcript, last_assistant_message=long_response)
)):
capture_stop._capture()