Hey @Rahul_Chauhan, thanks for the detailed report!
First, could you confirm you were running the CLI in non-interactive mode (with -p/--print)? Assuming so, here’s where things stand:
Yes, in non-interactive mode there’s a known gap where beforeSubmitPrompt, afterAgentResponse, and stop aren’t emitted.
No,sessionEnd is a separate session-teardown event (it carries the end reason and duration) and isn’t meant as a stand-in for stop. Today no non-interactive event carries token usage, loop count, or the final response text. In interactive mode, afterAgentResponse carries input/output/cache token counts and stop carries status and loop count.
Those are per-model-generation IDs, while in non-interactive mode the session and tool events currently fall back to using the conversation ID as generation_id instead of the real per-generation ID. For now, conversation_id is the reliable correlation key in non-interactive runs.
Closing the hook lifecycle gap between the IDE and CLI (including non-interactive mode) is on the team’s radar, though I can’t share a timeline!