SnapshotJuly 2026a point-in-time write-up, left as written

Self-learning loops

The system gets sharper if you let it. Claude can reflect on its own work and improve the context it operates from: its AGENTS.md, its Skills, its understanding of the codebase. This is how the compounding promised by everything through Claude actually accrues.

Reflection as a technique

The underlying pattern (an agent reviewing its own output and updating its persistent context based on what it learned) was formalized as Reflexion by Shinn et al. (2023). The core idea: maintain a running log of what went wrong and why, and feed that log back into subsequent attempts. Verbal self-reflection, stored in persistent memory, outperforms naive retry loops.

That academic framing is useful, but the practical version is simpler: at the end of a session, ask Claude what it learned, and land the learnings in files that future sessions will read.

The end-of-session reflection

The move at the end of any productive Claude Code session:

“Reflect on this session. What did you learn about this project that wasn’t in AGENTS.md or the specs? What corrections did I make that should land as durable rules? Propose specific edits to AGENTS.md or new Skills.”

Claude reviews the transcript, proposes concrete additions and, if you approve, writes them to the right files. The next session starts smarter.

The reflections skill on this site does this more formally: it pulls concepts, decisions, insights, and opportunities from the session into persistent project memory with a clean structure.

Capturing shortcuts for searches that didn’t work

A specific, useful pattern: when Claude takes three tries to find something, capture the correct path so future sessions skip the dance.

Example: you ask about authentication, Claude searches auth/, finds nothing useful, searches src/lib/, finds nothing, finally finds the logic in server/middleware/. At the end of the session, you have Claude write:

“In AGENTS.md, add: Authentication logic lives in server/middleware/, not auth/ (legacy name).”

Next session, Claude reads that and goes directly to the right place. Every session like this one compounds.

Saving key insights as durable notes

Some sessions produce realizations (about the user, the product, the architecture, the market) that are worth more than the specific work done. Write those down, in docs/ or alongside the spec.

The test: if reading this note in six months would change what you do, save it. If it’s session-specific trivia, let it go.

Mining local session logs

Every Claude Code session is logged locally (under ~/.claude/projects/). Those logs are a compounding asset if you treat them as one.

Periodically (weekly, monthly) point Claude at the last N sessions in a project and ask for patterns:

“Read the last month of sessions in this project. What patterns show up that suggest a Skill I should write or an AGENTS.md rule I should add?”

The output is often surprising. Claude spots repeated corrections, wasted searches, and duplicated work that you don’t consciously notice.

The compounding effect

Reflection-based self-improvement is what researchers call “self-improvement 1.0”: limited compared to techniques like self-play that generate new training data. But it’s also by far the most deployable form of self-improvement today: it needs no special infrastructure, just an LLM, a memory store (your .md files), and a willingness to ask the right question at the right time.

Each session that ends with a reflection leaves a footprint. A year of reflected sessions leaves a knowledge base that makes the next year’s sessions sharper.

Anti-patterns

Resources