[0.42.0] - 2026-04-28
Added
- Ghost-surface detector now consumes user-turn text from the content sidecar to recognise slash-command invocations (#172).
burn waste --patterns ghost-surfacenow populatesGhostSurfaceInputs.userTurnTextBySessionfromreadContent({ sessionId })for Claude / Codex sessions before running the detector. As a result, a Claude command invoked via<command-name>/foo</command-name>and a Codex prompt invoked via/openspec-applyno longer surface as ghosts even though they never appear as tool calls. The map is keyed bySourceKindfirst so a Claude<command-name>marker can't de-ghost an identically-named Codex prompt and vice versa. Sessions whose content sidecar is empty (content.store=off, pruned, or never captured) silently fall back to v1 (tool-call only) behaviour, matching the existing graceful-degradation contract elsewhere inburn waste. The CLI only loads sidecars for sources that have a slash-command notion (Claude / Codex), so OpenCode sessions pay no extra I/O cost. burn waste --patterns tool-output-bloat(#168). New cross-harness detector that flags oversizedtool_resultcontent riding in cache. Two signals fold into one table: Signal A reads~/.claude/settings.jsonand the project.claude/settings.jsonand flags anyenv.BASH_MAX_OUTPUT_LENGTHwhose token-equivalent (chars / 4) exceeds 15000 tokens (≈ 60000 chars; project overrides user, last-wins); Signal B walks the ledger'stool_result_eventsstream (#42 substrate) for any session in scope and reports per-(source, toolName)buckets above the threshold (defaultmax(15000 tokens, p95)with a sample-size guard), pricing the next-turn carry cost at the source turn's model input rate. Findings render in the unified--findingstable next to retry-loops, failure-runs, etc.;--jsoncarriestoolOutputBloatsalongside the other detector arrays. Suggested fix surfaces as aWasteAction.paste— a character-unit corrected env line for Signal A (default60000), ahead/tail/grepreminder for Signal B's CLAUDE.md / AGENTS.md.burn waste --patterns ghost-surface(#166). New detector kind that flags user-installed surface files (Claude~/.claude/{agents,skills,commands}/, Codex~/.codex/{prompts,skills,rules,memories}/, OpenCodeopencode.json+ project skills folder) whose basenames never appear in the observed-names set mined from the turn stream. Output is a labeledGhost user-installed surfacetable with columnssource | kind | path | tokens | sessions | cost | note. JSON output (--patterns --json) gains aghostSurfacearray; the unifiedfindingspayload (--patterns --findings) folds ghost findings in alongside retry-loop / failure-run / etc. and severity-ranks them byusdPerSession(per-session cost, not cumulative). Each finding's suggested fix is acommand-styleWasteActionfor filesystem ghosts (mkdir -p <archive-dir> && mv <path> <archive-dir>/, shell-quoted for safety) and apaste-style instruction for OpenCodeopencode.jsonentries (synthetic JSON-pointer paths can't bemv'd). OpenCode declared-catalog skills are emitted withcost: $0and acatalog (#54)note in the table to avoid double-counting against theopencode-system-promptcatalog-bloat detector. Slash-command-style invocations are detected via #172 when the content sidecar is available. Bare--patterns(no value) now selects all 10 detectors; the previous count was 8.- OpenCode ingest persists compaction events (#148). The OpenCode passive ingest path now appends parser-emitted compactions through the existing ledger compaction writer, so
burn waste --kind compactioncan see OpenCode context compactions with the same event shape Claude and Codex use.