Feature request: Hook event for auto-suggested prompts
Feature Request
Add a hook event that fires when Claude Code generates auto-suggested prompts (the dimmed "ghost text" that appears in the input area after a response).
Context
Claude Code generates contextual follow-up suggestions after responses — e.g., "run the tests", "deploy to production". These appear as dimmed placeholder text in the terminal input. Users can accept them with Tab/Enter or ignore them.
Currently, these suggestions are:
- Generated client-side in the terminal UI
- Completely transient — not persisted to JSONL transcripts
- Not exposed to any hook event
- Invisible to any external observability or monitoring system
Proposed Hook Event
A new hook event type (e.g., SuggestedPrompts or ResponseSuggestions) that fires after a response completes and suggestions are generated.
Stdin payload:
{
"session_id": "abc123",
"suggestions": [
"run the tests",
"deploy to production"
],
"parent_message_id": "msg_01..."
}
Use Case
I'm building Kuroryuu, an Electron desktop app for Claude Code that includes a real-time observability dashboard tracking all 12 hook events (tool usage swim lanes, event timelines, pulse views, etc.). Being able to track what Claude suggests — and which suggestions users accept — would provide valuable insights into:
- Workflow patterns: Which follow-up actions does Claude most commonly suggest?
- Acceptance rate: How often do users accept suggestions vs. type their own prompts?
- Session flow: Understanding the natural rhythm of human-AI collaboration
- UX research: Which suggestion styles are most useful?
Current Workaround Attempts
| Approach | Result |
|----------|--------|
| Hook stdin (Stop/Notification) | Suggestions not included in any hook event payload |
| JSONL transcript parsing | Suggestions not persisted — only API message exchanges stored |
| Anthropic API response | No suggestion field in the Messages API response |
Environment
- Claude Code v2.1.x on Windows 11
- Hook system: PostToolUse, Stop, UserPromptSubmit, SubagentStop, Notification (working)
- 7 of 12 hook events broken as standalone arrays on Windows (separate known issue)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗