README table is wrong about Pi's hook support - it's actually Full, not High
What's wrong
The "Session continuity requires 5 hooks working together" table in the README marks Pi as missing UserPromptSubmit and Stop hooks, giving it a "High" rating instead of "Full".
I was looking at this table and honestly, I was pretty confused. Pi has a ton of hooks available - before_agent_start, turn_end, session_start, session_before_compact, tool_call, tool_result, and more. How can it be missing hooks compared to Claude Code when it clearly has equivalents for everything?
What's actually happening
Looking at the Pi adapter source (build/adapters/pi/extension.js), it's already using Pi's native events to cover all the same functionality:
| Claude Code hook |
Pi event |
What it does |
PreToolUse |
tool_call |
✅ Blocks/mutates tool calls |
PostToolUse |
tool_result |
✅ Captures events after tool execution |
UserPromptSubmit |
before_agent_start |
✅ Captures user prompts and decisions |
Stop |
turn_end |
✅ Captures turn-end state and usage |
PreCompact |
session_before_compact |
✅ Builds resume snapshot before compaction |
SessionStart |
session_start + context |
✅ Restores state and injects session context |
The adapter registers 10 pi.on() handlers total. It's using before_agent_start to capture user prompts (storing them internally as "UserPromptSubmit" in the SQLite DB) and turn_end for usage tracking (stored as "Stop"). These are just Pi's event names for the same concepts.
The "UserPromptSubmit" and "Stop" strings in the code are context-mode's internal labels, not Pi event names. The adapter normalizes everything across platforms.
The table is misleading
The table is checking for literal Claude Code hook names instead of whether the adapter actually implements the functionality. It's like saying a car doesn't have "steering" because it uses a yoke instead of a wheel.
Pi should be rated Full, same as OpenCode and KiloCode (which also use surrogate events like experimental.chat.system.transform for SessionStart and chat.message for UserPromptSubmit, and they're marked as Full).
Suggested fix
Update the table to either:
- Mark Pi as "Full" since all functionality is implemented via equivalent events
- Or add a note explaining that Pi uses different event names but has full coverage
Something like:
| Hook | Pi |
|------|-----|
| PreToolUse | ✓ (via tool_call) |
| PostToolUse | ✓ (via tool_result) |
| UserPromptSubmit | ✓ (via before_agent_start) |
| Stop | ✓ (via turn_end) |
| PreCompact | ✓ (via session_before_compact) |
| SessionStart | ✓ (via session_start + context) |
| **Session completeness** | **Full** |
Why this matters
The table is probably the first thing people look at when evaluating context-mode for their platform. If Pi shows up as "High" with missing hooks, people might think it's second-class or incomplete. But it's not - it has full session continuity, just like Claude Code.
The docs should reflect reality, not just copy-paste Claude Code's hook names as the source of truth.
Environment:
- context-mode version: latest (installed via
pi install npm:context-mode)
- Platform: Pi Coding Agent
- OS: macOS
README table is wrong about Pi's hook support - it's actually Full, not High
What's wrong
The "Session continuity requires 5 hooks working together" table in the README marks Pi as missing
UserPromptSubmitandStophooks, giving it a "High" rating instead of "Full".I was looking at this table and honestly, I was pretty confused. Pi has a ton of hooks available -
before_agent_start,turn_end,session_start,session_before_compact,tool_call,tool_result, and more. How can it be missing hooks compared to Claude Code when it clearly has equivalents for everything?What's actually happening
Looking at the Pi adapter source (
build/adapters/pi/extension.js), it's already using Pi's native events to cover all the same functionality:PreToolUsetool_callPostToolUsetool_resultUserPromptSubmitbefore_agent_startStopturn_endPreCompactsession_before_compactSessionStartsession_start+contextThe adapter registers 10
pi.on()handlers total. It's usingbefore_agent_startto capture user prompts (storing them internally as "UserPromptSubmit" in the SQLite DB) andturn_endfor usage tracking (stored as "Stop"). These are just Pi's event names for the same concepts.The
"UserPromptSubmit"and"Stop"strings in the code are context-mode's internal labels, not Pi event names. The adapter normalizes everything across platforms.The table is misleading
The table is checking for literal Claude Code hook names instead of whether the adapter actually implements the functionality. It's like saying a car doesn't have "steering" because it uses a yoke instead of a wheel.
Pi should be rated Full, same as OpenCode and KiloCode (which also use surrogate events like
experimental.chat.system.transformfor SessionStart andchat.messagefor UserPromptSubmit, and they're marked as Full).Suggested fix
Update the table to either:
Something like:
Why this matters
The table is probably the first thing people look at when evaluating context-mode for their platform. If Pi shows up as "High" with missing hooks, people might think it's second-class or incomplete. But it's not - it has full session continuity, just like Claude Code.
The docs should reflect reality, not just copy-paste Claude Code's hook names as the source of truth.
Environment:
pi install npm:context-mode)