Hi,πŸ‘‹ we have updated the app and fixed multiple bugs. We are lacking funds, request to free user not to use Adblock. Ads are non intrusive. 😊

✨ Visual Editor

close

Thread Truncated

Only the first 20 tweets are shown to ensure high-quality rendering and prevent image size issues.

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135Β°

style Card Style

40px
16px

text_fields Typography

16px
darkzodchi
@zodchiii
Most looping agents have amnesia. Each cycle starts fresh, so they retry the same failed fix three times because nothing remembers it already didn't work.
Thread image
darkzodchi
@zodchiii
A learning agent keeps a journal: after every attempt it writes down what it tried and whether it worked, then reads that journal before the next attempt.
darkzodchi
@zodchiii
Set it up once and the loop stops repeating itself. Each pass starts from what the last one learned instead of from zero.
darkzodchi
@zodchiii
Here's the full setup you needπŸ‘‡
darkzodchi
@zodchiii
Before we dive in, I share daily notes on AI & vibe coding in my Telegram channel: https://t.me/zodchixquant🧠
darkzodchi
@zodchiii
Thread image
darkzodchi
@zodchiii
## Why loops repeat themselves
darkzodchi
@zodchiii
A normal loop runs the same agent on the same problem again and again, but the agent's memory resets between cycles. It doesn't know cycle 2 already tried the thing it's about to try in cycle 4.
darkzodchi
@zodchiii
So it loops in circles, swapping the same library, reverting, swapping it back, burning tokens rediscovering dead ends. The loop runs, but it doesn't learn.
darkzodchi
@zodchiii
The fix is memory that survives between cycles: a journal the agent writes to and reads from every pass.
darkzodchi
@zodchiii
Thread image
darkzodchi
@zodchiii
## File 1: the journal
darkzodchi
@zodchiii
This is the memory. A plain file the agent appends to, never overwrites. Create .claude/loop-journal.md:
darkzodchi
@zodchiii
# Loop journal
Append-only. Each attempt: what was tried, the result, the lesson.

## Task: fix failing checkout test

### Attempt 1
Tried: added await to the fetchCart call.
Result: still failed, same error.
Lesson: the race isn't in fetchCart. Look upstream at the cart state.

### Attempt 2
Tried: memoized the cart selector.
Result: failed differently now, cart is undefined on first render.
Lesson: memoization changed timing. The real issue is initial state.
darkzodchi
@zodchiii
The journal is dead simple on purpose. Every entry is three lines: what was tried, what happened, and the lesson for next time.
darkzodchi
@zodchiii
The lesson line is the gold, it's what stops the next cycle from repeating the attempt.---
darkzodchi
@zodchiii
## File 2: the learning loop
darkzodchi
@zodchiii
This is the orchestrator, and the one rule that makes it learn: read the journal first.
darkzodchi
@zodchiii
Drop into .claude/commands/learn-loop.md:
darkzodchi
@zodchiii
---
description: Run a task in a loop that learns from a journal each pass
argument-hint: <task>
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
model: sonnet
---

Task: $ARGUMENTS

Each cycle:
1. Read .claude/loop-journal.md fully. Note what was already
tried and what was learned. Never repeat a failed attempt.
2. Form a new hypothesis that the journal doesn't rule out.
3. Make the change. Run the check.
4. Append to the journal: what you tried, the result, the lesson.
5. Passed: stop, summarize what worked. Failed: go to step 1.
6. Cap at 6 cycles.

The rule: every cycle must try something the journal hasn't.
If you can't think of one, say so and stop. That's not failure,
that's the journal telling you to get a human.
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export