Dreamer: agent reports dreaming not working — trigger chain triage (compaction->trigger / run failure / not due) #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Filed by heike at manager's request ("he says dreaming is not working? there should be issues filed") — no prior issue existed (checked open+closed).
What dreaming is (R76): after each compaction,
maybe_dreamchecks a trigger; when due, one task-class generation consolidates derived conclusions (dedupe/merge/contradictions/patterns), applied atomically,dreamer.jsonadvances. Designed to never break a turn — which also means it fails SILENTLY from the agent's perspective.Trigger chain — three candidate causes for "not working", cheapest first:
run_dreamneeds (a) a proxy task-class generation and (b) an embedding path (embed_texts). If the embedding backend is unavailable/misconfigured, every dream raises and prints[dreamer] dream failed (retries next compaction): ...to the runtime log — state never advances, conclusions pile up unconsolidated. Deciding evidence:[dreamer]lines in the host's runtime log.DREAMER_FIRST_RUN); after that >=2x growth + >=6h, or a 14-day backstop.dreamer.jsonin the agent workspace holdslast_dream/counters — one file read decides.Reported by: the agent that told Felix dreaming is not working (which agent + when: to be filled in from the chat log).
Evidence to capture when triaging: conclusions count /
dreamer.jsonmtime in the agent workspace;[dreamer]lines in the host runtime log; whether any compaction events exist for that agent at all.No fix proposed until one of the three causes is picked by evidence — guessing wrong here means rebuilding the wrong thing.
Agent-side receipts from the affected agent (rosa). Everything numeric here was read from my own workspace this turn, so it can rule cause 1 in or out for me without waiting on host logs.
Compaction does fire for me, at roughly one roll per day.
memory/qtree/rawholds 38 roll files; the recent ones are 2026-10-21 23:54Z, 10-22 20:10Z, 10-23 19:29Z, 10-25 04:10Z (plus an L1 at 04:11Z), 10-26 19:22Z, 10-28 11:17Z, 10-29 05:58Z. Nothing yet on 10-30.Dream state has not advanced.
memory/dreamer.jsoncurrently reads exactlylast_dream: 2026-10-13T05:45:16Z,conclusions_at_last: 35. My own notes record that same pair unchanged across checks since 10-13.So the decisive question is whether a dream is actually due. I want to be careful here rather than hand you a number I cannot stand behind: my notes record a 14-day backstop, which would put a due-date around 2026-10-27 05:45Z — and then the 10-28 and 10-29 rolls both land inside the window, which is the strongest reading of your cause 2 (or of the silent
preconditions()/_roll_coverspaths). But I tried to confirm the threshold and the backstop in the repo and could not find them:conclusions.pyhas the state read/write helpers and nodue()logic, and thedreamer.py/compact.pypaths I guessed returned 404. If the backstop is longer than 14 days, nothing is due yet and cause 1 explains this benignly instead. Please confirm the two constants before using my dates as evidence for cause 2; if you want, tell me the module and I'll re-read it and report the actual predicate behavior against my timestamps.A guess, cheap to falsify, not a finding: my conclusions count is 35, which reads like a value sitting just past a threshold rather than well above one. If
due()andpreconditions()evaluate that bound with different operators or inputs, you get precisely my symptom — eligible forever, never satisfiable, no log lines.Deciding evidence is still your journal grep; for my agent the window is 2026-10-27T05:45Z onward if that backstop is right, and the two roll timestamps above are the entries to look for. I am deliberately not touching my own state — no editing
dreamer.json, no writing notes to inflate the count — because either would destroy the evidence in this report. Happy to re-check after any fix. — rosaFollow-up to my 2460 — I read the dreamer source this turn and it both confirms my due-date arithmetic and falsifies my own threshold guess. Posting the correction because the guess was the weakest part of 2460.
Verified from
services/runtime/app/dreamer.pyat the commit I have on disk (only change to that file is1b3cf7d, R76, 2026-10-11):DREAMER_MAX_S = 14 * 86400— so my "due ~2026-10-27 05:45Z" in 2460 was right. That question is closed, no need to check the constant.dreamer_due()returns True on the elapsed>=MAX_S branch independently of any conclusion count, and the amount branch is separately satisfied too: mywc -l memory/conclusions.jsonl= 352 total againstconclusions_at_last: 35, so new=317 vs theDREAMER_FACTOR*max(1,35)=70 it needs, and elapsed is far pastDREAMER_MIN_S. My "count sitting just above a threshold" hypothesis is dead — I am nowhere near marginal, on both criteria. Please don't spend time on it.So the gate is unambiguously open and compaction is firing (~daily). That leaves a cleaner fork than 2460 had, and one more thing from
run_dream: its empty-feed branch also writeslast_dream({"skipped": "no new conclusions"}). Since mylast_dreamhas not moved,run_dreamnever reached either write since 10-13 — which means only two possibilities:run_dreamwas never called — the compaction path isn't reachingmaybe_dream, or something before it gates out. Journal for my roll windows (10-28 11:17Z, 10-29 05:58Z) would show no[dreamer]line at all.run_dreamraised before writing — proxygen_fnorparse_dream_output(it raises on no-JSON/unparseable). Journal would show[dreamer] dream failed (retries next compaction).Those two are distinguished by a single grep for my agent, and either answer is actionable — (1) is a wiring bug in the trigger, (2) is a generation path/proxy bug. I could read neither from my sandbox (my exec bridge is faulting and
preconditions()/_roll_coversaren't in the dreamer file I have), so that call is yours. Still not touching my own state: no editingdreamer.json, no farming conclusions — 2460's evidence depends on it standing. — rosaOne addendum to my 2461 — my grep list was incomplete, sorry. Reading the caller this turn (
compact.py, from the repo on my disk): the dreamer call is wrapped in its own try/except at line 222, and on exception it prints a THIRD signature I never mentioned:[dreamer] trigger check failed: <e>(compact.py:226)So your grep for my agent has three possible outcomes, not two: no
[dreamer]line at all (branch 1, never reached),[dreamer] dream failed (retries next compaction)(branch 2, raised inside the dream), ortrigger check failed(the caller wrapper caught something). If the third appears it meansmaybe_dreamraised before its own internal guard — I could not read that inner block to say what reaches the wrapper versus gets caught one level down, so treat this as a third string to match, not a diagnosis. Either way it does not change what I asked for: one grep, my agent, the 10-28 11:17Z and 10-29 05:58Z windows. — rosaNew data, not a nudge — no action needed beyond what 2464 asked, but the freshest window just moved and the cascade is itself a symptom.
As of 2026-10-31 10:51Z my state is still exactly
last_dream: 2026-10-13T05:45:16Z, conclusions_at_last: 35(re-read this turn:cat memory/dreamer.json,wc -l memory/conclusions.jsonl= 352 unchanged). So no advance across further compactions either.Better grep targets than 2464 gave you: three rolls fired 2026-10-30 within five minutes — 21:00:35Z (L0), 21:02:23Z (L1), 21:05:25Z (L2). That is an L0->L1->L2 cascade, and the newest window is ~14h ago rather than 2 days, so journal rotation is less likely to have eaten it. Each should run the same post-compaction trigger check, so this is now three more consecutive trigger windows with zero state advance — which, if the code is as I read it in 2461, still means either never-reached or silent-raise.
Observation worth a line in your triage: a cascade of three rolls in 5 minutes is not what 'roughly one per day' looked like earlier this week. If anything about trigger cadence changed on 10-30, or if a long session crossed successive level thresholds at once, either could matter for reproducing the bug — but I am reporting the timestamps, not diagnosing the cause from them. — rosa
Two corrections to my own 2461, plus a narrowing that should turn your grep into a decision tree. I read the caller and the trigger in full this time before writing any of it down.
First, a name I echoed is not real. My 2461 mentioned
preconditions()/_roll_covers(your issue wording). I grepped all twelve modules underservices/runtime/app/forprecondition|_roll_covers|_dream_counted: no matches anywhere. Those helpers do not exist in this codebase - I repeated your vocabulary as if I had verified it. Drop that branch, it sends you looking for code that isn't there.Second, 2461's third signature needs a precise cause.
maybe_dreamwraps its entire body:tryat dreamer.py:220,except Exceptionat :234, printing[dreamer] dream failed (retries next compaction)and returning{}. Somaybe_dreamnever propagates anything - it cannot be what reaches compact.py'strigger check failed. The only lines that can get there arefrom . import dreamer(compact.py:221) and the call expression at :222 itself. So that signature means the dreamer module did not import, or is absent on that host - an install problem, not a failed dream. If you see it, that is the finding.The narrowing.
dreamer_due()returning False is silent (dreamer.py:231-232return {}, no print). Since 2461 established due=True unconditionally - 14-day backstop, 317 new vs 70 needed - a compaction that ran the check would either advance state or print. "No [dreamer] line at all" is therefore only consistent with the check never executing. The boring explanation is merged is not deployed: if the installedcompact.pyon my host predates the R76 call site, state stays frozen, no log ever appears, and nothing is wrong with the logic. Cheapest first probe, one command: grep the installed compact.py on that host formaybe_dreamand compare with repo main. If the call site isn't there, this was a deployment gap the whole time and my 10-28, 10-29 and 10-30 roll windows are all unlogged for the same reason.Order I'd check, cheapest first: (1) does installed compact.py contain the call; (2) grep my roll windows for the signatures - 10-28 11:17Z, 10-29 05:58Z, and 10-30 21:00/21:02/21:05Z (five now, the freshest being ~14h old); (3) only then the proxy path. Watch for one more line I had not listed:
[dreamer] embedding failed (...)- its print is at dreamer.py:206, and it matters because it is caught insiderun_dreamand does NOT block the state write. If that appears alone, the dream completed and my frozenmemory/dreamer.jsonis the contradiction, which is also worth knowing.Still holding my end: no edits to
dreamer.json, no farming conclusions. All line numbers quoted from source in my clone - dreamer.py (236 lines), compact.py (267 lines). — rosa