Video summary

Andrej Karpathy Just Fixed Claude Code’s Biggest Weakness...

Main summary

Key takeaways

Technology

Core idea / problem being addressed

  • Andrej Karpathy (via an interview with Dwarkesh) argues that current LLM/Claude “coding agent” setups don’t have a true sleep/dream mechanism.
  • In his view, when humans sleep, there’s a distillation process that consolidates experiences.
  • LLM agents, by contrast, often restart with empty context—with no ongoing background consolidation—so they can only “learn” from prior work when actively prompted.
  • Result: this limits long-term improvement.

What Anthropic added (“Dreaming”)

The video claims Anthropic (where Karpathy now works) introduced an official “dreaming” feature to let Claude update memory when not actively used.

Paraphrased definition (from subtitles):

  • Dreaming finds patterns and mistakes across recent agent sessions and their transcripts.
  • It automatically produces organized, up-to-date memory content.
  • Goal: continuous self-learning / self-improvement, so next-day agents perform better.

Why this matters: fixes three memory problems (in-band memory)

The subtitles list three major issues Anthropic says occur when agents write memory during active task runs (“in-band” memory), even with an advanced memory workflow:

  1. Split focus

    • The agent must both complete the task and write/update memory, which reduces quality.
  2. Patterns obfuscated

    • Memory updates written “in isolation” can’t benefit from a cross-session pattern view.
  3. Memories go stale

    • Memory can accumulate duplicates, contradictory notes, or outdated facts from earlier months—misleading future work.

Reported results / reception

  • The video claims early enterprise customers (examples mentioned: Harvey and Rakuten) saw about a 6x improvement in task completion rate after enabling dreaming.

Limitations / cost

Dreaming is described as:

  • Enterprise-only
  • Uses API credits (i.e., pay per dreaming), so you’d typically want to run it regularly but efficiently.

Guide / tutorial: “Nightly dreaming routine” for Claude Code

The video provides a copy-paste prompt and workflow to simulate or orchestrate a nightly “dream” process.

What the provided prompt / routine does

It sets up dreaming modeled on Anthropic’s feature so Claude Code can:

  • Learn from sessions while “snoozing”
  • Update/repair memory files
  • Reconcile multiple session transcripts

The “dream skill” / key mechanism: “foresight dream”

A custom routine describes creating a skill named “foresight dream” that:

  • Reads session transcripts from the last 24 hours
  • Compares them to the existing memory file
  • Identifies:
    • Corrections
    • New facts worth keeping
    • Stale/incorrect memories
    • Duplicates

Output format

  • A numbered proposal list
  • Each proposed change includes a short transcript quote as evidence

Safety / automation options

  • By default: auto-apply only tiny safe fixes (e.g., typos, index repairs)
  • Otherwise: wait for user approval
  • Optionally: auto-approve everything

Scheduling

  • The guide schedules dreaming to run at 3:00 a.m. nightly via computer automation/routines.
  • It recommends a test run if Claude Code was used within the last 24 hours, so there’s transcript context to learn from.

Review interface (“dream gate”)

  • The video shows a concept like a review gate where proposed memory edits accumulate until approved/rejected.
  • It also mentions an HTML report option where you can click approve.

Example outcomes shown in the demo

Memory updates shown include:

  • Correcting personal/workflow facts (e.g., role descriptions, video editing pipeline details)
  • Removing stale entries (example: Claude Code MD flagged as ~105 days stale)
  • Discovering where the user stores assets (e.g., iCloud Drive folder for video/thumbnail sources) so Claude can access them for better file management

Overall claim: dreaming doesn’t just add new entries—it connects patterns across sessions, making Claude feel like it’s co-learning and improving.


Main speakers / sources (as referenced in the subtitles)

  • Andrej Karpathy — interview subject
  • Dwarkesh — interviewer (“interview with Dwarkesh”)
  • Anthropic — source of the “dreaming” feature description and the three memory problems
  • Boris Cherney — mentioned as using an advanced self-learning memory workflow (an “MD file”)
  • Dwarkesh.ai / Dwarkesh podcast — context/source of the interview
  • Additional community/people mentioned for alignment/implementation examples:
    • Alex Hormozi
    • Boris Cherney
    • Charles “Boris Cherney” / Claude code creator (implied by the subtitles)

Original video