<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: vericum</title>
    <description>The latest articles on DEV Community by vericum (@wildeconforce).</description>
    <link>https://dev.to/wildeconforce</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3923851%2Fb169d8f1-4bb1-4947-a013-6edbfd0dc3b9.jpg</url>
      <title>DEV Community: vericum</title>
      <link>https://dev.to/wildeconforce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wildeconforce"/>
    <language>en</language>
    <item>
      <title>I Reimplemented Anthropic Dreaming. The First Dream Was Wrong.</title>
      <dc:creator>vericum</dc:creator>
      <pubDate>Mon, 11 May 2026 00:26:12 +0000</pubDate>
      <link>https://dev.to/wildeconforce/i-reimplemented-anthropic-dreaming-the-first-dream-was-wrong-1gi6</link>
      <guid>https://dev.to/wildeconforce/i-reimplemented-anthropic-dreaming-the-first-dream-was-wrong-1gi6</guid>
      <description>&lt;p&gt;Anthropic announced Dreaming five days ago at Code w/ Claude.&lt;br&gt;
I rebuilt it over a weekend for a single-developer crypto trading bot.&lt;br&gt;
 &lt;br&gt;
The first dream pass surfaced a clean time-of-day profit pattern.&lt;br&gt;
The next day's full-history backtest crushed that signal —&lt;br&gt;
zero variables passed Bonferroni, the walk-forward filter failed to generalize,&lt;br&gt;
and 69% of the 47-day loss turned out to be concentrated in three specific days.&lt;br&gt;
 &lt;br&gt;
Dreaming surfaced a hypothesis. The follow-up backtest disproved it.&lt;br&gt;
That is the right loop, and most "what is Dreaming" posts skip the second half.&lt;br&gt;
 &lt;br&gt;
This is the build, the finding, and the disproof.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
What Anthropic's Dreaming actually does&lt;br&gt;
 &lt;br&gt;
Dreaming is a memory-consolidation feature for long-running Claude agents.&lt;br&gt;
When an agent has been working in a codebase or domain for hours or days,&lt;br&gt;
its context window fills with raw transcripts, tool outputs, partial conclusions, and contradictions.&lt;br&gt;
 &lt;br&gt;
Dreaming runs an offline pass that scans accumulated state,&lt;br&gt;
extracts patterns, resolves contradictions, prunes stale references,&lt;br&gt;
and writes a clean consolidated memory back.&lt;br&gt;
The agent wakes up with a smaller, sharper, less-contradictory view of what it knows.&lt;br&gt;
 &lt;br&gt;
Anthropic described the design in their managed-agents post on 2026-05-06.&lt;br&gt;
A third-party reimplementation, dream-skill by grandamenium,&lt;br&gt;
formalized the four-phase loop into a skill anyone can install:&lt;br&gt;
Orient → Gather Signal → Consolidate → Prune &amp;amp; Index.&lt;br&gt;
That is the pattern I adapted.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
Why a solo builder needs this&lt;br&gt;
 &lt;br&gt;
I run a single-developer crypto trading bot called WILD_SNIPER.&lt;br&gt;
By 2026-05-10 its active-work/wild-sniper.md file had grown to 331 lines.&lt;br&gt;
Three "Previous current state" blocks contradicted each other.&lt;br&gt;
References to deprecated bot versions (V3.9.x forks, V4.0 paper logs)&lt;br&gt;
sat next to live V3.7.1 facts.&lt;br&gt;
A locked-strategy stance from 4/22 had been overturned by forensic analysis,&lt;br&gt;
but the override note lived in a different section.&lt;br&gt;
 &lt;br&gt;
This is not a theoretical mess. On 2026-04-30 the bot entered a self-kill loop —&lt;br&gt;
daily loss limit tripped (correct safety behavior),&lt;br&gt;
watcher daemon restarted the bot every cycle,&lt;br&gt;
bot detected the tripped limit and immediately re-shut.&lt;br&gt;
Watcher → bot → watcher → bot, until midnight.&lt;br&gt;
 &lt;br&gt;
The bot itself worked exactly as designed.&lt;br&gt;
The watcher's restart policy did not know about the tripped daily limit.&lt;br&gt;
That metadata gap was the bug.&lt;br&gt;
 &lt;br&gt;
Stale memory was not the cause of that incident,&lt;br&gt;
but the post-mortem made the cost obvious:&lt;br&gt;
when meta-state about the bot is fragmented across 331 lines and three contradicting sections,&lt;br&gt;
the operator cannot react quickly.&lt;br&gt;
Memory hygiene became infrastructure work, not housekeeping.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
The 4-phase pattern&lt;br&gt;
 &lt;br&gt;
I wrote a slash command, /dream-sniper,&lt;br&gt;
that runs once a week (Sunday 09:33 KST) on the bot's accumulated state.&lt;br&gt;
Source: ~/.claude/commands/dream-sniper.md.&lt;br&gt;
 &lt;br&gt;
Phase 1 — Orient&lt;br&gt;
Inventory all input surfaces.&lt;br&gt;
Count lines, note last-modified times, scan for pattern frequency.&lt;br&gt;
Do not read full files yet — just measure.&lt;br&gt;
 &lt;br&gt;
Inputs span four categories:&lt;br&gt;
current-state notes (active-work memos),&lt;br&gt;
accumulated trade logs (last 4 weeks),&lt;br&gt;
runtime logs (last 7 days),&lt;br&gt;
and bot health state files.&lt;br&gt;
The pass measures size and recency only —&lt;br&gt;
actual content reading happens in Phase 2.&lt;br&gt;
Output is a small JSON snapshot: per-domain line count, last-modified timestamp, and key pattern counts.&lt;br&gt;
Cheap by design.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0158pmduxadeulr6km3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0158pmduxadeulr6km3j.png" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;
Phase 2 — Gather Signal&lt;br&gt;
Targeted extraction.&lt;br&gt;
Search categories are deliberately abstract —&lt;br&gt;
the actual bot-side entry conditions, position sizing, and threshold values stay in the bot, not in the writeup.&lt;br&gt;
The dream pass surfaces whether a category is showing signal; the bot keeps the what.&lt;br&gt;
 &lt;br&gt;
Categories scanned:&lt;br&gt;
time-of-day pattern shifts,&lt;br&gt;
recurring failure modes per symbol,&lt;br&gt;
success-condition clusters,&lt;br&gt;
user decisions logged in Recent activity,&lt;br&gt;
and corrections/preference changes that should propagate forward.&lt;br&gt;
 &lt;br&gt;
Heavy analysis is delegated to a domain-specialist subagent&lt;br&gt;
rather than pulled into the main context.&lt;br&gt;
This keeps the dream pass cheap and the analysis sharp.&lt;br&gt;
 &lt;br&gt;
Phase 3 — Consolidate&lt;br&gt;
Integrate findings into the canonical memory.&lt;br&gt;
Convert relative dates ("yesterday", "last week") to absolute.&lt;br&gt;
Resolve contradictions by adopting the most recent.&lt;br&gt;
Drop stale references.&lt;br&gt;
 &lt;br&gt;
The critical safeguard here is a protected-file list.&lt;br&gt;
Certain memory files — autonomy rules, family PII, cross-project context,&lt;br&gt;
the user's personal preferences — are explicitly excluded from any dream-pass mutation.&lt;br&gt;
Without that list, a dream pass can cheerfully "consolidate" away&lt;br&gt;
information that is load-bearing across other projects,&lt;br&gt;
or worse, drift the user's stated rules.&lt;br&gt;
 &lt;br&gt;
Phase 4 — Prune &amp;amp; Index&lt;br&gt;
Hard cap on file size: wild-sniper.md stays under 200 lines.&lt;br&gt;
Old "Previous current state" blocks move to archive/wild-sniper-.md.&lt;br&gt;
The memory index gets a one-line summary of the new insight.&lt;br&gt;
 &lt;br&gt;
The archive is not deletion. Everything stays recoverable.&lt;br&gt;
The active file stays sharp.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
The first dream — what it actually found&lt;br&gt;
 &lt;br&gt;
First pass ran 2026-05-10 23:42 KST.&lt;br&gt;
Pool: V3.7.1 sub-era A, trades from 4/7 through 4/30, N=236.&lt;br&gt;
 &lt;br&gt;
Headline reconfirmation:&lt;br&gt;
realized R:R 0.499.&lt;br&gt;
Expected value per trade -$0.039.&lt;br&gt;
Cumulative PnL over 24 active trading days: -$9.25.&lt;br&gt;
The math is internally consistent — this strategy is a slow leak, not noise.&lt;br&gt;
 &lt;br&gt;
The new finding was a sharp time-of-day pattern in KST:&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8xlv90uzz1shmwumyw2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8xlv90uzz1shmwumyw2.png" alt=" " width="696" height="341"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;
Late-night Asia (00-05 KST): WR 64-87%, net positive.&lt;br&gt;
Mid-morning Asia open (07-10 KST): WR 10-43%, net dump.&lt;br&gt;
The 10:00 hour alone leaked -$2.34 on N=19.&lt;br&gt;
 &lt;br&gt;
Easy story to tell:&lt;br&gt;
"the bot has an edge in low-volume Asia-night windows and gets shredded by the morning open."&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fknqq4upaina9sxbh4aix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fknqq4upaina9sxbh4aix.png" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
The honest follow-up&lt;br&gt;
 &lt;br&gt;
The next day I ran a full-history backtest.&lt;br&gt;
920 live paired trades, twelve bot versions, 47 days of data.&lt;br&gt;
Entry-side features only —&lt;br&gt;
using post-trade observables like exit type or slippage at entry time is lookahead bias.&lt;br&gt;
First pass made that mistake, second pass fixed it.&lt;br&gt;
 &lt;br&gt;
Results across 69 univariate hypotheses:&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;Bonferroni-significant signals (alpha = 0.000725): 0&lt;br&gt;
BH-FDR-significant signals (alpha = 0.05): 0&lt;br&gt;
Raw-p &amp;lt; 0.05 signals: 3 (hour 10, hour 8, Friday)&lt;/p&gt;

&lt;p&gt; &lt;br&gt;
Of those three raw-p hits, the strongest (Friday, p=0.0235) turned out to be&lt;br&gt;
102 of 128 Friday trades coming from one Friday — 2026-04-03.&lt;br&gt;
"Fridays are bad" was structurally "April 3rd was bad."&lt;br&gt;
 &lt;br&gt;
The dream's 00-05 KST signal does not appear in the corrected list.&lt;br&gt;
On the broader pool:&lt;br&gt;
hour 0 raw-p 0.039,&lt;br&gt;
hours 1-4 not even raw-significant,&lt;br&gt;
hour 5 actually loses.&lt;br&gt;
The pattern was real inside V3.7.1's sub-era A&lt;br&gt;
but did not generalize across other bot versions.&lt;br&gt;
 &lt;br&gt;
The walk-forward 70/30 split (train cut at 04-20 05:35 KST) is the deciding test.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F191t9bobd1ujved6o7ms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F191t9bobd1ujved6o7ms.png" alt=" " width="733" height="189"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;
The filter saves $2.55.&lt;br&gt;
The 95% bootstrap CI under conservative costs: [-$23.90, -$11.53].&lt;br&gt;
Firmly negative both ways.&lt;br&gt;
 &lt;br&gt;
And the most uncomfortable finding:&lt;br&gt;
the worst three days (04-03, 04-25, 04-26) account for -$13.01,&lt;br&gt;
which is 69% of the entire 47-day -$18.82 loss.&lt;br&gt;
Drop those three days and the bot is nearly break-even.&lt;br&gt;
 &lt;br&gt;
The "00-05 is good" pattern was not a signal about time-of-day.&lt;br&gt;
It was an artifact of a few specific catastrophic trading days falling outside that window.&lt;br&gt;
Patch the symptom and the disease keeps eating.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
What Dreaming is good for, what it isn't&lt;br&gt;
 &lt;br&gt;
Good for:&lt;br&gt;
Memory hygiene — the 331-line active-work file has a path to staying under 200 without manual archival.&lt;br&gt;
Pattern detection — the time-of-day finding was real (in sub-era A) and worth surfacing.&lt;br&gt;
Hypothesis generation — the dream gave the next day's backtest its question.&lt;br&gt;
Decision audit trail — recent activity entries become harder to lose.&lt;br&gt;
 &lt;br&gt;
Not good for:&lt;br&gt;
Validating the patterns it surfaces.&lt;br&gt;
That is a separate step — backtest, walk-forward, multi-comparison correction.&lt;br&gt;
Acting on dream output without a confirmation pass.&lt;br&gt;
The system should make the hypothesis cheap and the action expensive.&lt;br&gt;
Replacing domain analysis.&lt;br&gt;
The dream pass is shallow by design. The real work happens in the follow-up.&lt;br&gt;
 &lt;br&gt;
The honest framing:&lt;br&gt;
Dream surfaces "this looks like something."&lt;br&gt;
The next day's rigorous backtest tells you whether it actually is something.&lt;br&gt;
Dream is allowed to be wrong. The backtest is the part that has to be right.&lt;br&gt;
When both pieces exist, the system gets sharper.&lt;br&gt;
When only the dream exists, the system gets confidently wrong.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
Cost / infrastructure&lt;br&gt;
 &lt;br&gt;
Runs on Claude Max subscription spare quota.&lt;br&gt;
One healthcheck pass costs roughly 2k tokens.&lt;br&gt;
One weekly dream costs roughly 10k.&lt;br&gt;
Daily total under 14k tokens — below 1% of an average user's monthly limit.&lt;br&gt;
 &lt;br&gt;
Most subscribers use 5-15% of their plan.&lt;br&gt;
The remaining 85% is unused quota that expires monthly.&lt;br&gt;
Putting a monitoring agent on that surplus costs $0 incremental.&lt;br&gt;
 &lt;br&gt;
The infrastructure pattern:&lt;br&gt;
one slash command per cron,&lt;br&gt;
two crons per active project&lt;br&gt;
(/sniper-healthcheck every 4 hours, /dream-sniper weekly Sunday).&lt;br&gt;
Auto-rehydration on session start ensures cron jobs survive PC restarts without manual intervention.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzjk73q7f84wpsyvafpd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzjk73q7f84wpsyvafpd.png" alt=" " width="800" height="993"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
Closing&lt;br&gt;
 &lt;br&gt;
After building this, what I realized is that Dreaming is not much different&lt;br&gt;
from what I have already been doing for months.&lt;br&gt;
 &lt;br&gt;
Across multiple projects — not just the trading bot —&lt;br&gt;
I have been layering automated cycles inside the context window:&lt;br&gt;
log collection → pattern detection → validation → discard.&lt;br&gt;
The structure was already systematized and running.&lt;br&gt;
Dreaming is just a name and a formalization for that same structure.&lt;br&gt;
 &lt;br&gt;
That said, the fact that Anthropic shipped this as an official feature&lt;br&gt;
is also a confirmation that the approach was right.&lt;br&gt;
 &lt;br&gt;
V3.7.1 keeps running unchanged.&lt;br&gt;
No filter was added.&lt;br&gt;
The next two weeks are observation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpxlaufqqzc7a8loy0kx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpxlaufqqzc7a8loy0kx.jpg" alt=" " width="800" height="1248"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>dreaming</category>
      <category>ai</category>
      <category>python</category>
    </item>
  </channel>
</rss>
