# B-002 post-fix E2E (Phase 14) Run: `node scripts/b002-repro-post-fix.mjs` (LiteLLM `Eltex-Coder-Senior`, skill at `~/.cursor/skills/fup-blame-commits`). Patches `~/.pi/agent/settings.json` temporarily (`skillReinject.debug: true`, `requireRegistered: false`, `autoCompactIntegration: defer`). ## 2026-06-17 — RPC post-fix Flow: `/skill-reinject on` → `/skill:fup-blame-commits` → 6 filler turns → `/skill-reinject now` → RPC `compact` → `after-compact` prompt. | Check | Result | |-------|--------| | Unit regression (`test/reinject*.ts`, `test/reinject-deferred-consume.test.ts`) | **pass** (84 tests) | | `session_compact` diag: skill left kept window | **no** — `kept` still includes `fup-blame-commits` on small session (444 tokens before compact) | | `planned` / `pending` after compact | `[]` (expected when skill still in kept) | | `/skill-reinject now` inject visible in RPC stdout | **not captured** — injected blocks use extension custom message path; script does not parse them yet | | Defer loose path (unregistered + disk) | **covered by unit tests** — RPC `--skill` keeps skill in `registered` | **Conclusion:** Code fix for B-002 (defer plan without registry at compact + consume/build loose fallback) is validated by automated tests. Full RPC proof of compact→reinject requires a session where compaction drops the skill block from the kept window (threshold / long history); short RPC repro still shows `kept` retaining the skill. **Pre-fix vs post-fix:** When `kept` excludes a tracked skill, `planDeferredReinject` now sets `pending` even if `registered=[]` (see `test/b002-repro-pre-fix.test.ts` case 3 + `test/reinject.test.ts`).