ALL MEMOS Download .docx

Key Insight

Claude Code v2.1.141+ added eight significant hook capabilities that TITAN has not yet adopted:

1. terminalSequence — hook JSON output field that lets hooks emit OS notifications (OSC 9/99/777 sequences) without /dev/tty access. Works in tmux, screen, Windows Terminal, Ghostty. Use to ping Harnoor's desktop when long /feed or /forge runs complete.

2. continueOnBlock — PostToolUse hook option. When set true, a "block" decision surfaces the rejection reason back to Claude as a tool_result instead of halting the turn. Use when the block reason is actionable (e.g., "this file is in a frozen directory; write to staging/ instead").

3. args exec form — command hooks with an args: string[] field bypass shell tokenization. Each element is one literal argument. Eliminates .cmd/.bat shim issues on Windows and avoids escaping special characters. Critical for TITAN on Windows.

4. mcp_tool hook type — hooks can now call MCP server tools directly instead of spawning a subprocess. Pattern: {"type": "mcp_tool", "server": "my_server", "tool": "security_scan", "input": {...}}. Match all tools from a server: mcp__memory__.*.

5. shell: "powershell" — command hooks can specify "shell": "powershell" to run natively on Windows without bash translation layer.

6. CLAUDE_ENV_FILE — SessionStart, Setup, CwdChanged, and FileChanged hooks can write exports to this path; variables persist into all subsequent Bash calls for the session.

7. UserPromptExpansion — new event fires when a slash command expands, before PreToolUse. Gives hooks visibility into which skill is being invoked and from which source (plugin vs user).

8. PreCompact / PostCompact — hooks fire before and after context compaction. Use to checkpoint staging entries before compaction discards intermediate research context (addresses the long-/feed-session data-loss risk noted in the SKILL.md gotchas).

Action Items

Relevance