Vibe Coding
Tip: Use MessageDisplay Hooks to Build Custom Agent UIs in Claude Code
The new MessageDisplay hook event in Claude Code 2.1.152 fires when assistant text is rendered, letting hooks transform or hide output in real-time. Practical applications: strip verbose chain-of-thought reasoning and show only final answers, inject markdown formatting for specific output patterns, redact sensitive data before it hits the terminal, or route different message types to different display handlers. Combined with PostToolUse hooks (which now support updatedToolOutput for all tools, not just MCP), you can build custom agent experiences on top of the base Claude Code terminal.
Source
↳ Follow the thread