Jesús Ortiz
enes

notes /

I unplugged the internet and the agent kept coding

15 Nov 2026

A work table seen from above, split into eight places. Seven hold a kitchen object: a recipe book, a frying pan, a blender, a knife, a stack of books, a pot and a whisk. The eighth, dotted, holds a small code window with an orange cursor. A dotted wire leaves the table towards a chip.

Sometimes the cloud models go down, or they seem to struggle with something they did easily the day before, and you have no idea what’s going on.

Some people worry that the AI bubble will burst and agent prices will go through the roof. I see it in my own numbers: agenthook stats tells me my cloud agents burn through hundreds, sometimes thousands of dollars in a single day. Luckily I pay a flat rate, but if I had to pay that price tomorrow, I’d be back to coding the way I used to, with a hammer and chisel.

That’s why I wanted to run AI on my own computer. It gives me security and autonomy, even when the cloud systems fail. It’s like having solar panels and batteries: when my neighbors lose power, I can keep working.

I tried it inside AgentHook, my agent orchestrator, and it didn’t work the first time.

The first attempt

I figured I’d be going back to how things were a few months ago with my cloud agents: a PR with a few rough spots here and there, the kind you fix with a couple of follow-up prompts or by improving the instructions, the ticket or the system docs. What happened instead I didn’t see coming. The model would read a file, think for a bit and, before writing its first line of code, run out of space and have to compact what it had so far. It kept thinking, ran out of space again and compacted again, over and over and over.

Imagine asking someone to make grandma’s mole on a tiny table. They take out the chiles, the seeds, the chocolate and grandma’s notebook. The table fills up before the stove is even on, so they clear everything off and leave just a scrap of paper with a summary: “it has chiles, seeds and chocolate.” The scrap no longer says which chiles or in what order. They take things out again, the table fills up again, they summarize again, and hours go by, you’re starving, and there’s still no mole!

It took me a while to understand enough about how context, tools, instructions and harnesses work to get out of that. For a moment I got discouraged, thinking I’d need a lot more VRAM, the memory on the graphics card, to get enough context for even a first line of code.

What each thing is

In case these words are new to you, here they are, using the mole example:

  • Model. The cook. It takes in text and decides the next step: “open this file”, “change this line”.
  • Harness. The kitchen. It gives the model tools and lets it read and write files. Without it, the model can only talk.
  • Tool. A utensil. An action the harness offers the model: read, search, edit, run.
  • Skill. A recipe book. Instructions for one kind of task. The model sees the title and opens it when needed.
  • Context window. The work table. Everything the model can keep in mind at once. It’s measured in tokens, which are pieces of words, and it has a fixed size.
  • Compacting. What the harness does when the table fills up: it clears everything off and leaves a summary.
  • Ticket. The order. A written task: “fix this”, “add that”. I write the ticket; the agent reads it, makes the change and hands over the code for another agent to review.
the loop · every lap takes space

An order (the ticket) reaches the cook (the model). The cook asks the kitchen (the harness) to do things, which acts on the dish (your code). Every result stays on the work table (the context window), and the cook reads it again on the next lap. The table has a fixed size, so every lap takes a place.

orderticketcookthe modelkitchenharnessdishyour codethe tablecontext windoworderticketcookthe modelkitchenharnessdishyour codethe tablecontext window

Every lap leaves something on the table, and the table doesn’t grow.

What was filling the table?

Before buying anything, I measured where the space was going.

The harness instructions, the description of every tool and the title of every skill were filling a quarter of the context I could give my agent. Reading whole files is very expensive: a single read of my biggest test file took almost two thirds of the window. And what moves the number most is the size of the ticket. A small, well-scoped one fits easily; a big one doesn’t fit even in the cloud models without losing memory along the way.

For a while now, the standard for cloud models has been 1 million tokens of context (which, by the way, I don’t recommend filling, for cost or for performance). But I could only give my agents about 64 thousand.

Tokens
Local model’s window, first setup 64k
What the harness takes with the ticket loaded 15k to 19k
One read of the biggest test file 41k
What a normal ticket of mine needs* 122k
The biggest ticket I measured* 420k

* Stats from my real AgentHook tickets

My tickets, the way I write them today, need twice what I had.

Fewer recipe books, a different kitchen

The first big change was deleting a pile of skills that were eating a good chunk of my available context. With a 1 million window it didn’t even matter, to the point that I had no idea when I’d installed them. I went from dozens of technique and recipe books to just a handful, the ones that matter for making grandma’s mole the way it deserves. In numbers: from 42 skills I kept 8, and the catalog went from almost 3k tokens to under 1k.

I also changed kitchens. I started in Claude Code, which is what I use every day, moved to DSH (DeepSeek Harness) and then to OpenCode. I typed “hello” into each one and looked at the counter.

Harness A “hello” takes
Claude Code, my everyday setup 59k
dsh, with my 42 skills 10.2k
OpenCode 8.2k

In the cloud, with a window of a million tokens, 59k is 6% and I had never noticed it. In a local window of 64k it’s 92%.

Once I was on OpenCode, the first lines of code started to show up.

“Done! What do I do now?”

AgentHook depends on a verdict at the end of every agent run. It’s a short note the agent writes when it finishes, and with it AgentHook knows whether the ticket moves to the next column on the board for the next agent to pick up, gets blocked, or needs something else from me. It’s an AgentHook thing, and without a verdict the ticket stays where it is.

What went wrong next was that small tasks got delivered just fine, but medium ones forgot their instructions. The agents compacted, and after compacting they sometimes forgot part of the initial message, the one that told them “when you finish, write a verdict in this format”. So they ended up proud of themselves, saying: “Done! What do I do now?”

Imagine walking into your favorite little restaurant and ordering chilaquiles in mole. The chef makes them perfectly, proudly shouts “Chilaquiles in mole, ready!” and then sits down to eat them himself…

when the table fills up

The agent reads files, one after another. The context window fills up. The harness compacts: it summarises what was there and drops the detail. The instructions, which travelled only once at the start, are lost. The agent wakes up without them and asks what to do instead of acting.

reads filesnon-stopfills upthe windowcompactssums up, dropsforgetsthe rulesaskswhat now?reads filesnon-stopfills upthe windowcompactssums up, dropsforgetsthe rulesaskswhat now?

I sat down and read the full log of one of those runs, and found two things.

First: my instructions traveled only once, in the first message. When the harness compacted, it summarized them along with everything else, and the part about the verdict got lost in the summary.

Second: every time it compacts, OpenCode sends the agent a message I didn’t write: “continue if you have next steps, or stop and ask for clarification”. The agent had just forgotten what it was supposed to deliver, so it did what the harness suggested: it stopped and asked.

To fix it, the important instructions stopped traveling only once at the start. I made the harness get them at every step, so they survive any summary. It’s like taping grandma’s recipe to the kitchen wall. I also made the end of each step depend more on the flow and less on what the agent thinks or does.

A bigger table and a different cook

The other fix was really two changes at once. I gave the cook a bigger table: I stopped running two agents at a time and ran just one, and with that memory the window went from 64k to 128k tokens.

And I changed cooks. The 35B Qwen I was using is what they call an MoE model: it has a lot of parameters, but for each word it only uses a small part of them. It’s fast and light, and in practice it’s the small model. I swapped it for a dense 27B Qwen, which uses all of its parameters all the time.

With the 128k window and the dense model, everything changed. The local model solved a hard fix, with a merge conflict in the middle. It used 104k tokens without compacting once. It took 44 minutes; in the cloud, something like that takes about 15.

how much table is left · three cases

Three cases on the same scale. Claude Code with my everyday setup: a bare hello already takes 59K, 92% of a 64k local window, leaving 5K to work with. OpenCode with Qwen3.6 35B MoE and a 64k window: starts at 14.8K, reaches 58.5K reading files, compacts to 11K and ends with a question instead of a delivery. OpenCode with Qwen3.8 27B dense and a 128k window: starts at 19K, reaches 104.1K without compacting and delivers with green CI. For reference, my tickets in the cloud usually peak around 122K (median of 44 runs); big ones go past 300K.

my tickets in the cloud usually peak near 122KClaude Code · 64k92% full after a helloa hello already takes 59K · 5K leftOpenCode · 35B · 64kasks and stopsstart 14.8K · peak 58.5K · compacts to 11KOpenCode · 27B · 128kdelivers · green CIstart 19K · peak 104.1K · no compaction032K64K96K128Kmy cloud tickets: ~122KClaude Code · 64k92% full after a helloa hello already takes 59K · 5K leftOpenCode · 35B · 64kasks and stopsstart 14.8K · peak 58.5K · compacts to 11KOpenCode · 27B · 128kdelivers · green CIstart 19K · peak 104.1K · no compaction032K64K96K128K

The first wins

With the bigger table and the new model I started running tests, and I started getting my first wins. This is where things stood that day, counting only the step that writes code. Each attempt is a ticket I gave that model, and each delivery is a ticket that ended with code ready for review.

Model Where it runs Window Attempts Deliveries
Qwen3.6 35B (MoE) my computer 64k 9 2
Qwen3.8 27B (dense) my computer 128k 1 1
DeepSeek v4-pro cloud 256k 9 9
Claude Sonnet cloud — 3 3

With the small window and the MoE model, my computer delivered 2 out of 9. With the big window and the dense model, it delivered the one ticket I gave it. The cloud models delivered everything. Worn out for the day, I decided to stop there.

There was still a long way to go. It’s a single sample with the big window, and I changed the window, the model and the instructions all at once, so I can’t say which one mattered most. Also, 128k is barely above the 122k a normal ticket of mine needs, and the biggest ones still don’t fit unless I split them.

I unplugged the cable

Seeing those first tickets finished felt amazing. It’s the feeling of knowing you can get work done without depending on outside services. I even unplugged the internet cable to check that what I was seeing was real, and the agent kept coding!

What’s next

Once I had an agent coding, I ended up with more questions than before. Can I run two in parallel? Where else can I trim context, or where else can I find VRAM? Are there leaner harnesses? Can I tune the tools to spend fewer tokens every time the agent reads a file? Or should I structure my code in small files, each with one specific purpose?

If you’ve been through this, which of those would you tackle first? And if you’ve measured how much a “hello” takes in your harness, I’d love to know the number.

If you want to try AgentHook and my latest changes, the test version is on the next tag: npm i -g @jesuso/agenthook@next installs 0.16.0-rc.1. The code is on GitHub; if something breaks or turns out useful, tell me.

The machine: a GPU with 24 GB of memory and 32 GB of DDR4 RAM. Ollama as the model server, OpenCode as the harness inside a container. The run numbers come from the pipeline logs; the “hello” numbers, from each harness’s counter.

What would you do here? Email me.