JavaRush /Courses /Claude Code SELF /Why the agent gets dumber by the end of the day

Why the agent gets dumber by the end of the day

Claude Code SELF
Level 16, Lesson 2
Available

1. Inventory the arsenal by function, not by novelty

Before the final task of the section, Alex slows Tommy down right at the entrance.

— Hold up, don’t rush in, — he writes. — Today’s task is the last one, and an important one — before we get to work, let’s lay out everything you’ve picked up this month. You’ve been grabbing one tool after another all month: skills, agents, git, tests, diffs, plans, a trust dial. Everything got dumped into one pile. Before heading into battle, it helps to shake out the box once and see what you’re actually fighting with.

Tommy already opens his mouth to brag about the amount — look how much I know — but Alex cuts him off:

— Don’t count trophies. We sort by novelty — by what it is for. Three baskets: what fixes, what checks, what safeguards.

He casually drops a name for the template — TOOLBOX_MAP, arsenal inventory by function — and does not explain further. Tommy sits down and starts sorting it himself, one piece at a time.

— Where does the browser go? — he asks about a borderline case. — Ah, into “checks” when it proves the game is beatable. Rollback — is that fixing or safeguarding?

— Safeguarding, — Alex nods.

Tommy sorts — and the further he goes, the more it pulls him in. He thought there would be only a couple of items. But it keeps coming and coming: skills, plugins, agents, a bridge to data, hooks, voice, git with its commands, tests, logs, diffs, browser, plans, a dial, window hygiene… His hands can barely keep up. By the end, the screen shows three packed columns:

⚙️ TOOLBOX_MAP — arsenal for Part I

🔧 Fixes · moves the task forward 🔍 Checks · gives evidence 🛡️ Safeguards · lays down a safety net
agent in the CLI (not chat) test: red / green git init · add · commit
skill: install a ready-made one honest test (red → green) git checkout · log · diff
skills: combine them /diff — inspect changes branch per task
plugin: a whole set of features at once triage: unnecessary / risky / ± /rewind — rewind the session
subagent helper logs and stack trace as evidence planning mode (defaultMode)
MCP bridge to data browser: walkthrough of the scenario trust dial (manual/accept)
hook: event → action screenshot + vision model TASK_SPEC — task assignment
voice into the agent (s2t) success marker (the “passed” flag) scope — off-limits block
@targeted file delivery EVIDENCE_LOG — evidence bundle /context — peek into the window
goal-lite — recipe-based goal DELIVERY_REPORT — summary /compact · /clear
environment: IDE + plugins “done = proven” CLAUDE.md + project memory

Tommy leans back and silently stares at the three columns. He hadn’t been counting as he went — and now he sees it all at once, and it’s somehow… a lot. He still remembers himself a month ago: one bare terminal and “come on, the AI will do everything itself.”

— Holy crap, — he blurts out. — I can really use all this? A month ago I couldn’t do anything at all.

— You can, — Alex confirms briefly. — And note, this still doesn’t include all the theory you picked up along the way. How the web works, what an API is, tests, reading someone else’s code. That’s just the tools.

And under the tools there’s a second layer that Tommy also went through, but which doesn’t fit into the baskets: not “what I use to do it,” but “what I now understand about development itself.”

📚 What I now understand about development (DEV)

Topic What I understood
how the web works HTML / CSS / JS — structure, appearance, behavior
how a site runs server · IP · domain · deploy (“works on my machine” ≠ “works for everyone”)
where data comes from API — a service window; JSON response; MCP — a bridge to it
event-driven model event → action (a hook like a motion sensor)
what testing is walkthrough of the scenario · red→green test · screenshot as evidence
what the git world is main · branch · commit · diff — history, not a warehouse of copies
symptom ≠ root cause log/stack trace leads to the cause, not just the blast site
reading someone else’s code object of reading = change (diff); scope as a contract
task genres feature / bugfix / refactoring / reconnaissance — each has its own dial
attention window the agent does not see the whole repo, but a window; context is moved outside

And when it all settles, Tommy looks at both maps and falters — but now in a different way. That night, on the first map, only the left column was filled in. “Fixes.” And “checks” and “safeguards” were empty. He wasn’t really checking anything, and he wasn’t laying down any safety net anywhere.

— Listen, — he writes to Alex. — So that’s why it all collapsed so easily. I had one giant “fixes” column. I kept pushing and pushing, but there was zero counterweight. Any glitch brought everything down hard, and there was nothing to catch it.

— Now you see your arsenal as a system, — Alex replies. — Not as a pile of multicolored magic, but as a set for three different jobs. It’s still a rough map, a starting point. We’ll leave the full science of “what to pull out when” for later. But you’ve grabbed the main thing.

2. A clogged window — the agent gets dumb

Tommy sits down to fix the bug — and gets stuck for a long time. The bug with reward allocation turned out to be spread across several places: first he and the agent dig into reward-flow.js, then it turns out the rules live in rules.md, then it emerges that the leaderboard also affects the payout — they open leaderboard.js. File after file, each one read in full by the agent. Meanwhile Tommy keeps trying variants: “what if we do it this way?” — no, rolled back; “or maybe like this?” — also no, back we went. A dozen approaches, three open files, a mountain of rejected ideas — and all of it is hanging around in the conversation.

And by the end of the hour he notices something strange. The agent, which was sharp and alert in the morning, starts to act dumb. It suggests the variant they threw away half an hour ago. It mixes up rules.md and leaderboard.js. It answers a simple question as if it were seeing the task for the first time.

— Hey, — Tommy writes to Alex, — why did it get dumber? Is the model broken or something? Or did I run out of some limit?

— Neither, — Alex replies. — Its attention window got clogged.

— The one from the level about the big portal?

— That one. Remember, we said the agent doesn’t magically see the whole project, only what fits into the window — your conversation history, the files you feed it, the rules. The window isn’t rubber.

— So?

— So in that hour you stuffed three whole files into the window plus a dozen rejected attempts. It all still hangs there — the important stuff and the junk mixed together. Now on every one of your questions the agent rereads all of that mess. It’s not that “it got dumber” — it choked. The symptoms are exactly what you’d expect: it drags up old stuff, mixes up files, argues with itself.

— And there’s nothing to do about it?

— There is. There’s a separate skill for that — attention hygiene, and that’s exactly what we’re going to do today. It’s a counterintuitive thing: sometimes, to make the agent “smarter,” you need not to add more context, but to throw away the extra. Let’s first see what’s actually in its window.

3. Peek into the window: /context

— First rule when something goes off the rails: don’t fix blind, look around first, — Alex writes. — Same as in someone else’s code: you don’t start changing things until you understand what’s there. The window works the same way: before you clean it, see what’s actually stuffed inside. You already know the command from the portal:

/context        # show what is currently in the attention window

Tommy types it — and a long inventory spills into the terminal. Not “the model is tired,” but a literal list of what the window is filled with:

Context window: 78% used (156k / 200k tokens)

  System prompt ............... 3k
  Project rules (CLAUDE.md) ... 4k
  src/reward-flow.js .......... 12k   ← needed
  src/rules.md ................ 6k    ← needed
  src/leaderboard.js .......... 18k
  Dialog history .............. 108k   ← 47 messages
  ...rejected options, old edits, already read files

Tommy looks at it and doesn’t understand half of it — numbers, percentages. What counts as a lot and what counts as little is still not something he can measure.

— Well, loaded is loaded, — he writes. — What is that supposed to tell me?

— Walk through the lines with me, — Alex replies. — Here’s reward-flow.js and rules.md — those are on point, that’s what you needed to feed it. And now look lower. leaderboard.js — eighteen thousand, a whole file you opened for a minute and closed long ago. It’s still hanging there. Then there’s one hundred eight thousand in the history: forty-seven messages, and a good half of them are your “what if we do it like this?” plus our rollbacks that are no longer relevant. See? Out of the one hundred fifty-six thousand tokens, if a quarter are actually useful, that’s already good. The rest is junk the agent drags around for every question you ask.

Tommy scans the list with his eyes — and it clicks.

— Wait. So it’s not dumb. It’s just overloaded. — He grins. — Like me at the end of the day, when I have a hundred tabs open in the browser and I’m drowning in them.

— Exactly, — Alex replies. — And now you’re not “taking my word for it” — you can see the pile yourself. Next step is figuring out how to clear it out.

4. Two levers: /compact and /clear

— If it’s clogged, we clean it, — Alex continues. — And here there are two different tools for two different situations, so don’t mix them up.

The first is to compress:

/compact                       # compress the history, keeping the essence and discarding the noise
/compact focus on reward-flow  # compress, but keep the important part about reward allocation

— /compact takes your bloated conversation and summarizes it, — Alex breaks it down word by word. — It keeps the essence, throws out the noise, and continues the session — you keep working on the same thing, just without the junk. And note the second option: you can hint at what exactly should be preserved. focus on reward-flow — “compress it, but don’t lose anything important about reward allocation.” That’s for when the conversation’s core is still needed, but it has swollen up.

Tommy runs /compact and opens /context again to see what changed:

Context window: 22% used (44k / 200k tokens)

  System prompt ............... 3k
  Project rules (CLAUDE.md) ... 4k
  src/reward-flow.js .......... 12k
  src/rules.md ................ 6k
  Dialog history (compressed) . 15k   ← was 108k

— Oh, — Tommy writes. — It was seventy-eight, now it’s twenty-two. And that stupid leaderboard.js is gone, and the conversation has shrunk. But the important stuff is still there — rewards, rules.

— Right. Same conversation, just without the pile of junk. The agent can see what matters again and stops mixing things up.

The second lever is to reset, and you already know it too:

/clear          # clean window, new session (old one will be saved, you can return to it)

— /clear doesn’t compress — it wipes the window clean, like a new session from a blank slate. Use /clear — and /context will show an almost empty window: just the system part and the project rules, no files, no history. Everything that was there is gone (the old session will be saved, and you can come back to it if you want).

— So what’s the difference, when do you use which one? — Tommy asks for clarification.

— Simple rule, — Alex replies. — /compact continues the same conversation, just compressed. /clear starts a new one from scratch. You still need the history, but it has swollen up — use /compact. The task is done, and a completely different one is ahead — /clear, so the garbage from the previous one doesn’t get dragged into the next. One compresses, the other resets.

5. Targeted file delivery with @fayl

— And there’s one more preventive measure so the window doesn’t get clogged like that in the first place, — Alex adds. — Look at what sunk you today. How did you enter the fix? Out of novice habit: “here, agent, read the whole portal and figure it out.” Sounds solid — let it, supposedly, absorb everything. But in practice, with that one sentence you dragged dozens of files into the window, and only two of them are actually relevant to the payout. The rest — layout, leaderboard, bonus game, someone else’s partner zone — the agent doesn’t need them right now, but they’re already in the window and already in the way. You yourself, with your own hands, filled its window with junk before the first question.

— So how should it be done?

— Feed it selectively. Not “read everything,” but “these exact files.” And there’s a handy trick for that. Start typing @ — and the terminal shows you a list of project files, so you pick the one you need without typing the whole path:

Fix @src/reward-flow.js, based on @src/rules.md.

— The @ sign isn’t just “mentioned the name,” — Alex explains. — Type @, a list pops up, click the file you need — it gets inserted and definitely goes into the window, with no path typos. Give it two or three relevant files, and that’s it. Not “inspect the whole project,” but “here is the work area, here are the rules.” Cheaper, faster, less noise — the agent keeps only what matters in its head, not the entire repository.

Tommy tries it another way: he resets the window and feeds only reward-flow.js and rules.md through @. And he immediately feels the difference — the agent answers in a collected, precise way, without wandering off into other people’s files.

— Oh, it goes straight to the point, — Tommy writes. — Hey, turns out the less I give it, the smarter it answers. Being stingy is actually profitable.

6. The double price of a stuffed window and the counterintuitive lesson of the day

— But why make such a fuss about it at all? — Tommy wants to understand it to the end. — So there’s extra stuff sitting in the window — and it sits there.

— Because a stuffed window hits you from two sides at once, — Alex explains on his fingers. — First — it’s expensive. Every request pays for the entire window in full. The thicker it is, the more expensive every move becomes. Second — it’s noisy. The more things are in the window, the harder it is for the agent to focus, the more often it gets confused. So a dirty window makes the work both more expensive and dumber at the same time.

— And a clean one does the opposite, — Tommy catches the idea himself. — So window hygiene isn’t greed, it’s not “saving on requests.” It’s a way to make it both cheaper and smarter in one move.

— You got it. And from that comes today’s main takeaway, — Alex sums up. — Sometimes, to make the agent smarter, you need not to add more context, but to throw out the extra. Sounds backwards, but it works.

— And it’s not a one-time button, — Tommy adds on his own. — It’s a sense. Now I can feel it as I go: feed it selectively here, compress it there, start from a blank slate there. An ingrained habit, like washing your hands.

— A new skill learned, — Alex nods. — All that’s left is to lock in the main habit of the whole course — that’s where it all started.

1
Task
Claude Code SELF, level 16, lesson 2
Locked
Inventory of the arsenal by function 🧰
Inventory of the arsenal by function 🧰
1
Task
Claude Code SELF, level 16, lesson 2
Locked
Feed files with precision 🎯
Feed files with precision 🎯
1
Task
Claude Code SELF, level 16, lesson 2
Locked
Take a look into the attention window 🔍
Take a look into the attention window 🔍
1
Task
Claude Code SELF, level 16, lesson 2
Locked
Compress or clear 🧹
Compress or clear 🧹
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION