Tagged: hooks
Part 6: Hooks Report Back
Give every session a settings file with hooks: a small script posts each event to the server, which follows the tools Claude Code uses, reads what it says from its transcript, and learns the exact end of every turn.
Intermediate40 minPart 7: The End of a Turn
Show what Claude Code says when it is done, rendered from Markdown without letting the model's text bring its own HTML, reply to it from the page, and tell exactly when a turn is over, also when it ends without a Stop hook.
Intermediate25 minPart 8: Claude Code's Questions in the Page
The core of Sitesmith: a PreToolUse hook holds Claude Code when it asks a question, the server hands the question to the page, and your answer goes back as the hook's output, so Claude Code goes on as if you had answered in the terminal.
Intermediate40 minPart 9: Permission Prompts in the Page
Hold Claude Code's permission prompts with a PermissionRequest hook and answer them in the page: allow once, allow from now on, or deny. And know why the terminal shows its own dialog at the same time.
Intermediate25 minPart 10: When the Page Can't Answer
No page open, the tab closed, the server restarting, a dialog the page has never seen: every way a question can miss the page, and how each ends in the page or the terminal, never in a wait for nobody. Plus the trust dialog, read from the screen and answered with keys.
Intermediate35 minPart 11: Approving a Plan
A "Plan first" box for the request: Claude Code works in plan mode, the server switches the mode with Shift+Tab and reads it off the status line, and the plan comes up in the page to approve or to send back with a note.
Intermediate25 min