The `Inference.ts` creates numerous short, meaningless inference sessions that clutter the resume picker. A feature to prevent the creation of ghost sessions would improve user experience by keeping the resume list clean.
## Summary `Inference.ts` runs `claude -p` for sentiment analysis, failure description generation, and other inference tasks. Each invocation creates a persisted session that appears in `claude --resume`, polluting the resume picker with hundreds of short, meaningless inference sessions. Over normal usage, this generates **224+ ghost sessions** that crowd out real conversations in the resume list. ## Environment - PAI v4.0.0, Algorithm v3.5.0 - Claude Code (Windows/MSYS2) - Inference callers: `RatingCapture.hook.ts` (UserPromptSubmit), `FailureCapture.ts` ## Root Cause `Inference.ts:99` builds the `claude -p` command without `--no-session-persistence`: ```typescript const cmd = `cat "${pf}" | claude -p --model ${config.model} --output-format text --setting-sources '' --system-prompt "$(cat "${sf}")" > "${of}" 2> "${ef}"`; ``` The existing reliability measures (env stripping per #931, background+file approach per #26190, `--setting-sources ''`) prevent hangs and recursive hook f