O agente não é só
o modelo.
The agent is not just
the model.
O modelo raciocina. O harness é tudo que ele pode tocar: ferramentas, sandbox, permissão, a forma do erro. O loop é o que acontece entre uma chamada e a próxima — o que dispara, o que verifica, o que faz parar.
Trocar de modelo muda pouco. Trocar essas duas muda o produto.
The model reasons. The harness is everything it can touch: tools, sandbox, permissions, the shape of the error. The loop is what happens between one call and the next — what triggers, what verifies, what makes it stop.
Changing the model moves little. Changing these two changes the product.
as duas camadas
the two layers
O que ele consegue fazer, e o que ele faz.
What it can do, and what it does.
Harness
O que o agente consegue fazer?
What the agent can do
- As ferramentas que existem — e como estão descritas. Ferramenta mal descrita é capacidade que nunca vai ser usada direito.
- O sandbox: sistema de arquivos, rede, limite de recurso.
- Permissão e aprovação — o que roda sozinho, o que espera gente, o que é recusado na hora.
- O que sobrevive a um reinício, e o que a compactação de contexto pode jogar fora.
- A forma do erro: uma ferramenta que falhou devolve algo estruturado, ou um stack trace opaco?
- Which tools exist — and how they are described. A badly described tool is a capability nobody will use correctly.
- The sandbox: filesystem, network, resource limits.
- Permissions and approval — what runs alone, what waits for a person, what is refused outright.
- What survives a restart, and what context compaction may throw away.
- The shape of the error: does a failed tool return something structured, or an opaque stack trace?
Loop
O que ele faz, e quando para?
What it does, and when it stops
- O que é uma iteração: planejar, agir, criticar, verificar.
- O que dispara a próxima — teste vermelho, veredicto, relógio, resposta humana.
- O critério de pronto. “Está bom” não é critério; “os testes passam e a cobertura não caiu” é.
- O que fazer quando falha: repetir igual, repetir diferente, voltar atrás ou parar.
- O teto de iterações e o detector de não-progresso.
- What one iteration is: plan, act, critique, verify.
- What triggers the next — a red test, a verdict, a clock, a human reply.
- The definition of done. “Looks good” is not one; “tests pass and coverage didn't drop” is.
- What happens on failure: retry the same, retry differently, back out, or stop.
- The iteration cap and the no-progress detector.
Se dá para consertar mudando um prompt, um critério de parada ou uma regra de repetição, é loop. Se é preciso mudar o que o agente consegue fazer ou enxergar, é harness.
If you can fix it by changing a prompt, a stopping condition or a retry rule, it is the loop. If you have to change what the agent can do or see, it is the harness.
às duas da manhã
at 2 a.m.
Em qual camada está falhando.
Which layer is failing.
Os sintomas se sobrepõem quase por completo. O que separa as duas não é a aparência do defeito — é o que resolve.
The symptoms overlap almost entirely. What separates the two is not how the defect looks — it is what fixes it.
| Sintoma | é loop se… | é harness se… |
|---|---|---|
| nunca termina | não há critério de parada, ou há um que ninguém consegue avaliar | o sinal que mandaria parar não é observável de dentro |
| para cedo demais | o critério de pronto está frouxo | a verificação não existe, ou falha calada |
| repete o mesmo erro | a nova tentativa é idêntica à anterior | o erro volta como texto opaco, sobre o qual não dá para agir |
| escolhe a ferramenta errada | o plano estava ruim | a descrição engana, ou a ferramenta certa não existe |
| funciona uma vez, falha na segunda | o ciclo presume estado limpo | não há isolamento entre execuções |
| bom no meu terminal, quebra no CI | — | quase sempre: credencial, sandbox, timeout |
| queima token sem andar | iteração sem teto, sem disjuntor | o contexto não é compactado e tudo é reenviado a cada turno |
| Symptom | loop, if… | harness, if… |
|---|---|---|
| never finishes | there is no stopping condition, or one nobody can evaluate | the signal that would say stop is not observable from inside |
| stops too early | the definition of done is loose | verification is missing, or fails silently |
| same error, again and again | the retry is identical to the attempt before | the error comes back as opaque text nobody can act on |
| picks the wrong tool | the plan was poor | the description misleads, or the right tool does not exist |
| works once, fails on the second run | the cycle assumes a clean slate | there is no isolation between runs |
| fine on my terminal, broken in CI | — | almost always: credentials, sandbox, timeouts |
| burns tokens without moving | uncapped iteration, no circuit breaker | context is never compacted, so everything is resent each turn |
O teste da repetição: rode a mesma tarefa duas vezes a partir de um estado limpo. A mesma falha nas duas aponta para o harness — defeito de ambiente é determinístico e se reproduz. Falhas diferentes apontam para o loop, porque o modelo seguiu outro caminho.
The repetition test: run the same task twice from a clean slate. The same failure both times points at the harness — environment defects are deterministic and reproduce. Different failures point at the loop, because the model took another path.
a conta
the bill
Loop dá pico. Harness vira imposto.
A loop spikes. A harness taxes.
O loop mexe na conta diretamente: o gasto é iterações × contexto por iteração, e ele controla os dois. O harness mexe de forma estrutural — uma ferramenta que devolve 40 mil tokens de log cru cobra por todos os turnos seguintes daquela trajetória. Loop ruim dá um pico que se nota. Harness ruim vira imposto que se paga para sempre.
The loop moves the bill directly: spend is iterations × context per iteration, and it controls both. The harness moves it structurally — a tool returning 40,000 tokens of raw log charges you for every remaining turn of that trajectory. A bad loop is a spike you notice. A bad harness is a tax you pay forever.
3 não disparou em duas rodadas seguidas: o modelo repetiu
2 vezes e, na rodada seguinte, desistiu na 1ª. O teste passava e
reprovava sem nada mudar no produto — o pior tipo de vermelho, o que ensina a
ignorar vermelho. Verificação que depende de o modelo se comportar mal é
intermitente por construção; a saída é tornar o teto ajustável e forçá-lo no
teste, não pedir com mais ênfase. Gate que nunca reprovou provavelmente não
é gate.
3 failed to fire on two consecutive runs: the model repeated
twice, then gave up on the first try. The test passed and failed
with nothing changing in the product — the worst kind of red, the kind that
teaches you to ignore red. A check that depends on the model misbehaving is
flaky by construction; the fix is to make the cap configurable and force it in
the test, not to ask more emphatically. A gate that has never failed is
probably not a gate.
prompt · contexto · loop · harness
prompt · context · loop · harness
A escada de escopo.
The scope ladder.
- Prompto que você diz — uma mensagem
- Contextoo que o modelo vê — uma chamada, a janela inteira
- Loopquantas vezes roda, e em que ordem — uma tarefa
- Harnesso que pode fazer, e onde — o sistema todo
- Promptwhat you say — one message
- Contextwhat the model sees — one call, the whole window
- Loophow often it runs, in what order — one task
- Harnesswhat it can do, and where — the whole system
Cada degrau contém o anterior, e cada um apareceu quando o de baixo encostou no teto. Para quem constrói agente hoje, o prompt é o degrau de menor alcance dos quatro — é o mínimo, não a vantagem.
Each rung contains the one below it, and each appeared when the previous hit its ceiling. For anyone building agents today, the prompt has the lowest ceiling of the four — table stakes, not an edge.
na prática
in practice
As duas camadas, construídas e medidas
The two layers, built and measured
Tudo acima é o argumento. O agent-computer é ele de pé: um desktop persistente onde agentes autônomos trabalham, com o harness inteiro — ferramentas, sandbox, cofre, privilégio, observação de kernel por eBPF — e um loop que verifica se a tarefa foi cumprida antes de aceitar que terminou. São sete motivos de parada, e o sétimo existe porque parar não é cumprir.
Everything above is the argument. agent-computer is that argument standing up: a persistent desktop where autonomous agents work, with the whole harness — tools, sandbox, vault, privilege, kernel observation through eBPF — and a loop that checks whether the task was actually fulfilled before accepting that it finished. Seven stop reasons, and the seventh exists because stopping is not fulfilling.
agent-computer.bassi.engineer → · github.com/andrebassi/agent-computer ↗
agent-computer.bassi.engineer → · github.com/andrebassi/agent-computer ↗