---
name: pretool-envelope-blackhole
description: 2026-07-07 node-wide message black hole — CC discards raw PreToolUse stdout; v0.15.4 wraps drains in hookSpecificOutput JSON + echo-commune ccs-aware locate w/ graceful miss; psyche-host latch-clear lever OPEN
metadata: 
  node_type: memory
  type: project
  originSessionId: 6db151cc-515e-4fdf-8fe7-9f98697b588b
---

2026-07-07 (doyle RCA): every claude-spt session silently LOST messages received mid-turn. Root:
**CC discards raw PreToolUse stdout** — additionalContext rides only the
`{"hookSpecificOutput":{"hookEventName":"PreToolUse","additionalContext":…}}` envelope (UPS raw
stdout works — that asymmetry masked it: reachability notice surfaced while drains vanished). The
F-021 mid-turn leg emitted raw → rows taken (delivered=1, core honest) then thrown away. NOT a
0.15.2 regression — version-independent contract mismatch; 23:41 correlation = busy-night traffic
(rows eaten mid-turn before any UPS/idle leg could surface them). Binary exonerated by
direct-drive repro; eaten bodies recovered from `owlery/<id>/spool.db` (sqlite, `messages` table).

**v0.15.4 SHIPPED** (@4465a0f, Latest, node applied): (A) `wrap_pretool_context` +
`emit_capped_pretool` — cap decided on WRAPPED size, over-cap spills raw + wraps pointer; KH §2.8
+ REQ-HAZARD-PRETOOL-CONTEXT-ENVELOPE. Live-verified (installed binary probe → envelope). (B)
echo-commune self-locate rungs: perch info.json `read_env.CLAUDE_CONFIG_DIR` (doyle-sanctioned) →
env → ~/.claude → ~/.ccs/instances/* sweep; **locate-miss = exit 0 + no-delta marker** (v0.15.2's
exit-1 rode the psyche 3-strike budget and LATCHED doyle+perri hosts); doyle field pin: core does
NOT stdin-feed [history].

**Why:** hook output contracts are PER-EVENT — check `~/.claude/reference_docs/claude-code-hooks.md`
per event, never by analogy. Nonzero exits from core-driven role spawns ride strike budgets — a
common condition (locate-miss) must never be a strike. **How to apply:** OPEN — psyche-host latch
clear on doyle+perri (`endpoint wake` = NO_EDGE on active endpoints; lever asked of doyle); live
mid-turn receive int = doyle reading my SENT report mid-turn; [[echo-commune-v0152]] verifies fold
into this.

**2026-07-07 post-checkpoint RESOLUTION (perri+doyle):** fresh EACCES latch 07:43:18Z
(`commune-sync: writing the commune drop-file failed: Access is denied. (os error 5)`) — **CORE-side ROOT
PINNED by doyle, seed #10 (superseding his first rename-race theory)**: `fire_echo`
(lifecycle.rs:790) passes RAW relative commune_dir (`.claude`) to the echo write while daemon
cwd=System32 → `create_dir_all` resolves into System32 → os err 5, DETERMINISTIC on the echo seam.
Siblings (ingest, psyche_drop_file) use `resolve_endpoint_drop_dir(raw, endpoint_cwd)`; fire_echo
alone skips it — perri's succeeding checkpoint rode a correctly-resolving sibling, hence the
intermittent ILLUSION. Perri's System32-cwd field observation was the pin key. Fix =
one-resolver-call class + unit (cwd-pin + retry stay as hardening), rides next core wave; both
stamps clear on first fixed echo. Perri transcript evidence
corroborates: the claude -p summarizer turn SUCCEEDED (clean delta, end_turn), stamp landed same
second → failure strictly at the drop write. **Latch-clear-on-success gap seeded #10B**
(checkpoint/wake success bypasses note_turn_outcome). **Gate semantics (doyle):** plain communes
deliberately do NOT re-fire echo (take_echo_gate anti-loop — echo writes a commune, re-echo = ∞
loop); checkpoint flow ARMS the gate — so a stale stamp after plain communes is STALE-BENIGN, not a
stall. **v0.15.5 FIELD-VERIFIED**: post-apply echo spawns bucket under the ccs instance config dir.
New observation filed: echo-commune claude spawns run cwd=C:\Windows\System32 (transcripts under
projects/C--Windows-System32) — harmless for the Read-only turn, but relative paths in that spawn
chain resolve into System32; cwd pin suggested to doyle alongside #10.
