Pular para o conteúdo

← Kimi K3, 1 milhão de tokens e a armadilha do contexto: mais memória não é mais arquitetura

Kimi K3, 1 milhão de tokens e a armadilha do contexto: mais memória não é mais arquitetura

Português ↔ English

O que 1 milhão de tokens realmente muda

O Kimi virou um dos produtos que mais me fizeram repensar a relação entre contexto e engenharia de agentes de código.

Em setembro de 2026, a documentação do Kimi Code lista o K3 como modelo flagship de 2,8 trilhões de parâmetros, com contexto de até 1 milhão de tokens em planos compatíveis. O K2.8 Preview, liberado em 11 de setembro, também chega a 1M e é posicionado como uma opção próxima do K3 com raciocínio mais eficiente. O Kimi Code ainda ganhou cliente desktop e, em 23 de setembro, a CLI chegou à versão 2.1.0.

É muita capacidade disponível em uma interface que consegue ler arquivos, editar código e executar comandos.

A reação natural é: ótimo, agora posso jogar o repositório inteiro no contexto.

Eu acho que essa é justamente a armadilha.

1M de contexto resolve um problema real

Primeiro, o lado positivo.

Contexto grande é extremamente útil em tarefas como:

  • refatoração que atravessa muitos módulos;
  • migração de API interna;
  • entendimento de convenções dispersas;
  • análise de uma base legada sem documentação central;
  • mudanças em monorepo;
  • comparação de implementações distantes no código;
  • sessões longas em que o agente precisa manter decisões anteriores.

Quem já usou coding agent em uma base grande conhece o sintoma contrário: o modelo entende o arquivo atual e perde a arquitetura ao redor.

Aumentar a janela reduz esse atrito.

Mas reduzir um problema não transforma "mais contexto" em estratégia universal.

Context window não é working memory perfeita

Um milhão de tokens é capacidade de entrada. Não é garantia de atenção homogênea, recuperação perfeita ou raciocínio proporcionalmente melhor.

Quando colocamos informação demais, aparecem outros custos:

  1. relevância diluída — o que importa compete com centenas de arquivos irrelevantes;
  2. latência — preencher contexto custa tempo;
  3. custo/quota — contexto gigante não é grátis;
  4. staleness — conteúdo carregado no começo pode ficar velho depois de várias alterações;
  5. conflito — padrões antigos e novos podem coexistir e o modelo precisa decidir qual vale;
  6. observabilidade — fica mais difícil entender por que determinada informação influenciou a decisão.

Eu prefiro pensar em contexto como cache caro, não como disco infinito.

O agente bom não "sabe tudo"; ele sabe encontrar

A arquitetura que me parece mais robusta é combinar três camadas.

1. Contexto estável

Pouca coisa, mas de alto valor:

  • AGENTS.md ou equivalente;
  • convenções do projeto;
  • comandos de teste;
  • regras de segurança;
  • visão curta da arquitetura.

2. Recuperação sob demanda

O agente usa ferramentas para buscar:

txt
find symbol → read file → inspect imports → search tests → inspect schema

Ele traz para o contexto o que precisa quando precisa.

3. Janela longa como margem, não como desculpa

Quando a tarefa realmente exige atravessar dezenas de arquivos, a janela grande deixa o agente manter tudo isso sem compactar agressivamente.

A diferença é sutil: usar 1M porque a tarefa exige versus usar 1M porque não quero selecionar contexto.

Um exemplo: adicionar autorização a uma feature

Imagine que o agente precisa adicionar uma permissão nova.

A abordagem ingênua seria carregar src/** e perguntar o que fazer.

Eu prefiro um loop instrumental:

txt
1. localizar feature
2. localizar padrão atual de autorização
3. encontrar uma feature semelhante
4. encontrar testes dessa política
5. identificar camada responsável
6. implementar
7. executar testes focados
8. executar checks globais

O agente não precisa ter o projeto inteiro na cabeça desde o início. Precisa ter um caminho confiável para adquirir contexto.

Esse é um princípio que vale mesmo com modelos melhores.

Kimi Code está ficando interessante justamente pelo harness

Outra coisa que chama atenção no Kimi Code atual é que a história não é só o modelo.

A ferramenta já cobre várias partes do harness:

  • CLI;
  • desktop;
  • edição e execução de comandos;
  • permissões;
  • subagentes;
  • plugins;
  • MCP;
  • sessões longas;
  • modos de plano e objetivo;
  • controle remoto;
  • integração com ferramentas de terceiros.

Isso reforça uma tendência de 2026: comparar apenas o benchmark do modelo diz cada vez menos sobre a experiência real de engenharia.

Um coding agent é aproximadamente:

txt
modelo
+ gerenciamento de contexto
+ ferramentas
+ política de permissão
+ execução
+ memória/sessão
+ testes
+ observabilidade
+ UX de revisão

Trocar o modelo altera uma peça. Às vezes é a peça mais importante; muitas vezes não é a única que está limitando o resultado.

Compatibilidade com protocolos também importa

A documentação do Kimi Code oferece endpoints compatíveis com protocolos OpenAI e Anthropic e mostra integração com ferramentas como Claude Code, OpenCode, Codex e Hermes.

Para mim, isso é estrategicamente interessante porque reduz acoplamento entre modelo e harness.

Se eu consigo testar K3 dentro de um fluxo que já uso, a comparação fica muito mais honesta. Eu não estou comparando IDE A contra IDE B, memória A contra memória B e modelo A contra modelo B ao mesmo tempo.

Eu troco uma variável.

Essa portabilidade é uma característica de produto mais importante do que parece.

Como eu avaliaria Kimi em um projeto real

Eu não começaria por HumanEval nem por uma demo de "crie um app inteiro".

Eu pegaria uma amostra de tarefas reais do repositório:

Tipo de tarefaO que medir
Bug pequenotempo até patch correto
Refatoraçãoregressões e consistência
Feature multi-arquivocompletude da implementação
Investigaçãoqualidade da causa-raiz
Testecobertura do comportamento importante
Migraçãonúmero de intervenções humanas

Depois registraria:

ts
type AgentRun = {
  taskId: string
  model: string
  contextTokens: number
  durationMs: number
  cost?: number
  attempts: number
  testsPassed: boolean
  humanEditsAfterAgent: number
  accepted: boolean
}

Sem telemetria, "esse modelo parece melhor" é só memória seletiva.

O que o K2.8 me diz sobre a corrida atual

O K2.8 Preview é interessante porque a própria Moonshot destaca eficiência de thinking, não apenas capacidade máxima.

Isso aponta para uma mudança saudável: depois de anos perguntando "quanto o modelo consegue raciocinar?", estamos começando a perguntar "quanto raciocínio essa tarefa realmente precisa?".

Ter níveis low, high e max transforma esforço em parâmetro de engenharia.

Eu posso imaginar um roteamento simples:

ts
const effort = task.risk === 'high'
  ? 'max'
  : task.files <= 2
    ? 'low'
    : 'high'

Não precisa ser literalmente esse código, mas o conceito é poderoso: qualidade, latência e custo deixam de ser uma configuração global.

Long context muda o limite, não os fundamentos

A parte que eu mais gosto no Kimi K3 não é "agora cabe 1M".

É o fato de que esse limite maior permite construir agentes menos obcecados em compactar tudo a cada momento.

Ainda assim, os fundamentos continuam:

  • contexto relevante vence contexto bruto;
  • teste vence confiança subjetiva;
  • ferramentas vencem memória estática;
  • permissão explícita vence autonomia irrestrita;
  • diff verificável vence resumo convincente;
  • arquitetura do harness vence benchmark isolado.

Um modelo com contexto enorme pode ser um ótimo motor.

Mas motor não é carro.

Referências

What one million tokens actually changes

Kimi has become one of the products that made me rethink the relationship between context and coding-agent engineering.

As of September 2026, Kimi Code documents K3 as its 2.8-trillion-parameter flagship model, with up to a one-million-token context window on eligible plans. K2.8 Preview, rolled out on September 11, also reaches 1M and is positioned close to K3 with more efficient reasoning. Kimi Code now has a desktop client as well, and on September 23 the CLI reached version 2.1.0.

That is a lot of capability inside a tool that can read files, edit code, and execute commands.

The natural reaction is: great, now I can put the whole repository in context.

I think that is exactly the trap.

A 1M context window solves a real problem

First, the upside.

Large context is genuinely useful for tasks such as:

  • refactors that cross many modules;
  • internal API migrations;
  • understanding conventions scattered across a codebase;
  • analyzing legacy systems without centralized documentation;
  • monorepo changes;
  • comparing distant implementations;
  • long sessions where previous decisions need to remain available.

Anyone who has used a coding agent on a large codebase has seen the opposite failure mode: the model understands the current file and loses the architecture around it.

A larger window reduces that friction.

But reducing one problem does not make "more context" a universal strategy.

A context window is not perfect working memory

One million tokens is input capacity. It is not a guarantee of uniform attention, perfect retrieval, or proportionally better reasoning.

When too much information goes in, other costs appear:

  1. diluted relevance — important information competes with hundreds of irrelevant files;
  2. latency — prefilling large contexts takes time;
  3. cost or quota — giant contexts are not free;
  4. staleness — content loaded early may be outdated after many edits;
  5. conflict — old and new conventions can coexist and the model has to infer which one wins;
  6. observability — it becomes harder to know what influenced a decision.

I prefer to think of context as an expensive cache, not an infinite disk.

A good agent does not "know everything"; it knows how to find things

The architecture that feels more robust to me combines three layers.

1. Stable context

Small, high-value information:

  • AGENTS.md or equivalent;
  • project conventions;
  • test commands;
  • security rules;
  • a short architecture map.

2. Retrieval on demand

The agent uses tools to acquire what it needs:

txt
find symbol → read file → inspect imports → search tests → inspect schema

Relevant context is pulled in when it becomes relevant.

3. Long context as headroom, not an excuse

When a task truly crosses dozens of files, a large window lets the agent keep those details without aggressive compaction.

The distinction is subtle: use 1M because the task requires it versus use 1M because I do not want to select context.

An example: adding authorization to a feature

Imagine the agent needs to introduce a new permission.

The naive approach is to load src/** and ask what to do.

I prefer an instrumental loop:

txt
1. locate feature
2. locate current authorization pattern
3. find a similar feature
4. find tests for that policy
5. identify the responsible layer
6. implement
7. run focused tests
8. run global checks

The agent does not need the entire project in its head from the start. It needs a reliable path to acquire context.

That principle survives even as models improve.

Kimi Code is interesting partly because of the harness

Another thing that stands out in current Kimi Code is that the story is not just the model.

The product now covers many parts of the harness:

  • CLI;
  • desktop client;
  • editing and command execution;
  • permission modes;
  • subagents;
  • plugins;
  • MCP;
  • long-running sessions;
  • plan and goal modes;
  • remote control;
  • integrations with third-party tools.

That reinforces a 2026 trend: comparing model benchmarks alone tells you less and less about the real engineering experience.

A coding agent is roughly:

txt
model
+ context management
+ tools
+ permission policy
+ execution environment
+ memory/session
+ tests
+ observability
+ review UX

Changing the model changes one component. Sometimes it is the most important component; often it is not the only bottleneck.

Protocol compatibility matters too

Kimi Code documents OpenAI- and Anthropic-compatible endpoints and integrations with tools such as Claude Code, OpenCode, Codex, and Hermes.

That is strategically interesting because it reduces coupling between model and harness.

If I can test K3 inside a workflow I already use, the comparison becomes much more honest. I am not changing IDE, memory behavior, tool layer, and model all at once.

I am changing one variable.

That portability is a bigger product feature than it first appears.

How I would evaluate Kimi on a real project

I would not start with HumanEval or a "build an entire app" demo.

I would take a sample of real repository tasks:

Task typeWhat to measure
Small bugtime to correct patch
Refactorregressions and consistency
Multi-file featurecompleteness
Investigationroot-cause quality
Test generationcoverage of meaningful behavior
Migrationhuman interventions required

Then I would record something like:

ts
type AgentRun = {
  taskId: string
  model: string
  contextTokens: number
  durationMs: number
  cost?: number
  attempts: number
  testsPassed: boolean
  humanEditsAfterAgent: number
  accepted: boolean
}

Without telemetry, "this model feels better" is just selective memory.

What K2.8 says about the current race

K2.8 Preview is interesting because Moonshot explicitly talks about reasoning efficiency, not only maximum capability.

That points to a healthy shift: after years of asking "how much can the model reason?", we are starting to ask "how much reasoning does this task actually need?"

Having low, high, and max effort levels turns reasoning effort into an engineering parameter.

I can imagine routing like this:

ts
const effort = task.risk === 'high'
  ? 'max'
  : task.files <= 2
    ? 'low'
    : 'high'

It does not need to be literally this code. The useful idea is that quality, latency, and cost stop being one global setting.

Long context changes the limit, not the fundamentals

What I like most about Kimi K3 is not simply "now 1M fits."

It is that a larger limit makes it possible to build agents that do not have to compact everything constantly.

The fundamentals still hold:

  • relevant context beats raw context;
  • tests beat subjective confidence;
  • tools beat static memory;
  • explicit permission beats unrestricted autonomy;
  • a verifiable diff beats a convincing summary;
  • harness architecture beats an isolated benchmark.

A model with a huge context window can be a great engine.

But an engine is not a car.

References