Summary
Two Pi Coding Agent drifts as of v0.84.0 (2026-08-06): the canonical stop hook is mapped to agent_end, which upstream now documents as the wrong analogue (it fires per low-level run, including auto-retries and queued follow-ups — agent_settled is the "agent actually finished" event); and the new v0.84.0 AGENTS.override.md per-directory context override cannot be emitted.
Recent Releases
- v0.84.0 (2026-08-06) — https://github.com/earendil-works/pi/releases — adds
AGENTS.override.md (PR #7681).
agent_settled lifecycle event introduced 2026-07-09 (commit "fix(coding-agent): add settled agent lifecycle event"), postdating rulesync's current mapping.
Gaps
1. hooks — canonical stop maps to agent_end instead of agent_settled
- Upstream (extensions.md at v0.84.0): "
agent_end fires when that run ends, but Pi may still auto-retry, auto-compact and retry, or continue with queued follow-up messages. Use agent_settled for status integrations that need to know Pi will not continue running automatically." The lifecycle diagram shows agent_settled after agent_end, annotated "(no retry/compaction/follow-up left)".
- rulesync (
project, global): CANONICAL_TO_PI_EVENT_NAMES maps stop: "agent_end" (src/types/hooks.ts:1169); agent_settled appears nowhere in src/. A user's stop hook (e.g. a notification ported from Claude Code) fires several times for a single user turn.
- Follow-up: remap
stop → "agent_settled" with a comment recording why agent_end is wrong; update pi-hooks.test.ts and the hooks reference docs. PI_HOOK_EVENTS itself is unchanged.
2. rules — AGENTS.override.md not emittable
- Upstream (usage.md at v0.84.0, Context Files): "If a directory contains
AGENTS.override.md, Pi loads it instead of AGENTS.md or CLAUDE.md from that directory."
- rulesync:
pi-rule.ts emits only the root AGENTS.md plus the opt-in .pi/APPEND_SYSTEM.md. Where a rulesync-generated AGENTS.md and a hand-authored CLAUDE.md coexist, the docs state no precedence — AGENTS.override.md is the upstream mechanism to make rulesync-managed context deterministically win, and rulesync cannot produce it.
- Follow-up: a
pi.contextFile: "override" frontmatter opt-in on the root rule switching the emitted filename, wired through getSettablePaths, fromFile, forDeletion, and import so a stale AGENTS.md is cleaned up when flipped.
Verified in parity
mcp / subagents / permissions / ignore are intentionally absent upstream ("No MCP. Build CLI tools with READMEs, or build an extension"); the only tool gate is blocking inside tool_call, already reachable via preToolUse. Commands carry both documented fields; skills cover the full SKILL.md spec; the other ten mapped hook event names all exist verbatim in v0.84.0.
References
Summary
Two Pi Coding Agent drifts as of v0.84.0 (2026-08-06): the canonical
stophook is mapped toagent_end, which upstream now documents as the wrong analogue (it fires per low-level run, including auto-retries and queued follow-ups —agent_settledis the "agent actually finished" event); and the new v0.84.0AGENTS.override.mdper-directory context override cannot be emitted.Recent Releases
AGENTS.override.md(PR #7681).agent_settledlifecycle event introduced 2026-07-09 (commit "fix(coding-agent): add settled agent lifecycle event"), postdating rulesync's current mapping.Gaps
1. hooks — canonical
stopmaps toagent_endinstead ofagent_settledagent_endfires when that run ends, but Pi may still auto-retry, auto-compact and retry, or continue with queued follow-up messages. Useagent_settledfor status integrations that need to know Pi will not continue running automatically." The lifecycle diagram showsagent_settledafteragent_end, annotated "(no retry/compaction/follow-up left)".project,global):CANONICAL_TO_PI_EVENT_NAMESmapsstop: "agent_end"(src/types/hooks.ts:1169);agent_settledappears nowhere insrc/. A user'sstophook (e.g. a notification ported from Claude Code) fires several times for a single user turn.stop→"agent_settled"with a comment recording whyagent_endis wrong; updatepi-hooks.test.tsand the hooks reference docs.PI_HOOK_EVENTSitself is unchanged.2. rules —
AGENTS.override.mdnot emittableAGENTS.override.md, Pi loads it instead ofAGENTS.mdorCLAUDE.mdfrom that directory."pi-rule.tsemits only the rootAGENTS.mdplus the opt-in.pi/APPEND_SYSTEM.md. Where a rulesync-generatedAGENTS.mdand a hand-authoredCLAUDE.mdcoexist, the docs state no precedence —AGENTS.override.mdis the upstream mechanism to make rulesync-managed context deterministically win, and rulesync cannot produce it.pi.contextFile: "override"frontmatter opt-in on the root rule switching the emitted filename, wired throughgetSettablePaths,fromFile,forDeletion, and import so a staleAGENTS.mdis cleaned up when flipped.Verified in parity
mcp/subagents/permissions/ignoreare intentionally absent upstream ("No MCP. Build CLI tools with READMEs, or build an extension"); the only tool gate is blocking insidetool_call, already reachable viapreToolUse. Commands carry both documented fields; skills cover the full SKILL.md spec; the other ten mapped hook event names all exist verbatim in v0.84.0.References