[Bug] Unbounded agent_status journal writes when the summary model has no configured auth #1752
Replies: 1 comment
|
Independent journal audit confirms this is still recurring. Across 25 top-level journals, I found 54,000+ persisted The affected status payloads did not add useful summary text. This matches the no-auth fallback in This supports a narrow persistence fix: append only when the durable status changes, do not fabricate a new No raw journals are attached because they contain private session data. |
Uh oh!
There was an error while loading. Please reload this page.
Affected area
Coding agent and CLI
What happened?
(Claudeslop follows)
When no credential is configured for the
prime-inferenceprovider,DaemonSessionSummarizercan never produce a recap — but it still appends an
agent_statusentry to the sessionjournal on every 25s sweep and every turn-end debounce, for every idle daemon-hosted
session. There is no convergence condition and no retry ceiling, so it writes forever.
On this machine it has produced 46,739 identical entries across 50 session files — 8.2 MB,
about 8% of
~/.prime/agent/sessions— with a single session file carrying 4,185 of them.Every entry is identical apart from
basedOnMessageCount:{"type":"agent_status","id":"<redacted>","parentId":"<redacted>","timestamp":"2026-08-21T06:06:46.168Z","status":{"summary":"","taskState":"needs_input","basedOnMessageCount":4}}Measured with the machine idle
Two sessions left idle, no user activity at all, 27 minutes elapsed:
That matches
SWEEP_INTERVAL_MS = 25_000exactly, which confirms the sweep alone drives it— no user interaction is involved. Extrapolated, that is ~3,456 entries per idle session per
day, or roughly 600 KB/session/day at the ~175 bytes these entries average.
Two distinct impacts:
runs, on any install that hasn't authed
prime-inference.taskState: "needs_input", so every one of those entries records a classification thesummarizer never actually performed — the model was never called. That's a data-integrity
problem for anything that reads
agentStatusback out of the journal, independent of thedisk cost. To be clear about scope: I have not observed a user-visible effect from this
in the TUI — idle sessions display correctly for me — so I'm reporting it as a bad
persisted value rather than a rendering bug.
Steps to reproduce
prime-inferenceprovider — no entry in~/.prime/agent/auth.json, no PRIME_API_KEY in the environment, no ~/.prime/config.json.
prime-agent, start a session, send one message, and let the turn finish so thesession goes idle.
watch -n5 'grep -c agent_status ~/.prime/agent/sessions/.jsonl'
appended entry byte-identical to the last.
Expected behavior
status transitions, not sweeps —
appendAgentStatuscurrently runs unconditionally foridle sessions, while the
changedflag computed three lines above it gates only thein-memory broadcast.
rather than re-arming
owesSummaryon every pass, and should not persist aneeds_inputverdict it never computed.
Prime Agent version
0.8.0
Environment
macOS 15
Additional context
No response
All reactions