Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1431fb9
fix: 安全恢复 Pi resume 会话锁
Jul 16, 2026
de0ab5d
no-mistakes(test): 修复注入分类与 watcher 测试竞态
Jul 16, 2026
5cb6558
no-mistakes(document): Align Pi resume lock documentation
Jul 16, 2026
9a5c8ca
no-mistakes(review): Validate native Pi resume lock recovery end-to-end
Jul 17, 2026
6737400
no-mistakes(review): Harden Pi resume scope, readiness, and isolated E2E
Jul 17, 2026
44f6753
no-mistakes(review): Transfer Pi watcher ownership on away entry
Jul 17, 2026
c630e40
no-mistakes(review): Harden Pi AFK monitor rollback and failure recovery
Jul 17, 2026
b0b7437
no-mistakes(review): Contain Pi wake rejection and back off monitor r…
Jul 17, 2026
96c58c6
no-mistakes(test): Pin tmux smoke test to Bash
Jul 17, 2026
832616a
no-mistakes(test): Fix locale-dependent composer classification
Jul 17, 2026
a4ad42b
no-mistakes(document): Clarify session-lock refusal and Pi fail-close…
Jul 17, 2026
a6e3f8e
no-mistakes(document): Clarify unowned session lock refusal documenta…
Jul 17, 2026
88118f1
no-mistakes(document): Clarify session lock refusal output
Jul 17, 2026
6ea5f41
merge: 合并最新上游并保留 Pi resume 安全恢复
Jul 19, 2026
cf33214
no-mistakes(review): 修正 Pi watcher 连续性指令与测试
Jul 19, 2026
4cd65b0
no-mistakes(document): 更新 Pi 锁恢复与连续性文档
Jul 19, 2026
c1cb5f0
merge: 合并最新上游并保留 Pi resume 锁安全
Jul 20, 2026
729db6a
no-mistakes(review): 确保 Pi 启动 nudge 先于锁恢复
Jul 20, 2026
f06321b
no-mistakes(review): 恢复 Pi fork/reload owned-only 监督连续性
Jul 20, 2026
820e685
no-mistakes(review): 贯通 Pi fork/reload owned-only 重建策略
Jul 20, 2026
9a28562
no-mistakes(review): 收敛 Pi startup/new defer 生命周期
Jul 20, 2026
642d971
no-mistakes(review): 统一 Pi successor readiness 策略晋升
Jul 20, 2026
b042d5e
no-mistakes(test): 修复 Pi CLI resume 会话锁恢复
Jul 20, 2026
5b3adbe
no-mistakes(document): 收敛 Pi 监督协议 owner
Jul 20, 2026
3cfcafa
merge: 合并 wake 上下文并保留 Pi resume 锁安全
Jul 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .agents/skills/harness-adapters/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ The decision persists per path in `~/.pi/agent/trust.json`, so later spawns in t
The extension must listen for pi's `turn_end` event, not `agent_end`, so the watcher wakes after each completed turn instead of only when the whole agent run exits.
Pi sets `PI_CODING_AGENT=true` for its children; this is its harness-detection env marker.

**Primary-session guard fact (verified 2026-07-09, Pi 0.80.5).**
**Primary-session guard fact (verified 2026-07-09, Pi 0.80.5; resume fixture verified 2026-07-16).**
The firstmate PRIMARY's own `.pi/extensions/fm-primary-turnend-guard.ts` listens for logical-run `agent_settled`, not per-tool-loop `turn_end`, and uses `pi.sendUserMessage(..., { deliverAs: "followUp" })` to force one guarded follow-up when `bin/fm-turnend-guard.sh` returns 2.
Without `deliverAs: "followUp"`, Pi rejects the send while the agent is still processing.
Pi's primary watcher protocol also requires the tracked `.pi/extensions/fm-primary-pi-watch.ts` extension, same trust-once discovery as the turn-end guard.
The model arms through `fm_watch_arm_pi`, never a foreground bash arm; the watcher tool result and clean-exit fallback are owned by `docs/supervision-protocols/pi.md`.
`docs/supervision-protocols/pi.md` owns Pi's session-start lock policy, primary and away-mode gates, automatic successor continuity, ordinary-wake behavior, recovery, and clean-exit protocol.
At the high-risk wake handoff, remember that the extension starts and verifies every later successor, so the model drains an ordinary wake without calling `fm_watch_arm_pi`.
Use `fm_watch_arm_pi` only for initial arming when automatic startup has not armed or for explicit recovery, never a foreground bash arm.
`bin/fm-session-start.sh` reports when the live Pi session has not loaded both the turn-end guard and watcher extensions, and points at plain `pi` after project trust as the fix, with `-e` as a trust-free fallback.
When a secondmate is launched on Pi, `fm-spawn.sh --secondmate` launches Pi with both `-e .pi/extensions/fm-primary-turnend-guard.ts` and `-e .pi/extensions/fm-primary-pi-watch.ts`, both already present in the secondmate home's git worktree.

Expand Down
Loading