Hope is not a workflow: notes on context rot from maib tech meetup

· ai, llm, claude-code, context-engineering, events

I went to maib tech meetup #4 in Chișinău. The talk I keep thinking about was Alexandr Chetroi’s (Engineering Manager at Hellotickets), titled “Hope Driven Development”. It was about something I run into every day with coding agents: a session that starts out sharp and slowly gets worse, without any clear moment where it breaks.

What I liked is that it wasn’t a list of prompt tricks. It explained why models drift, named each failure mode, and then showed the process his team built so they don’t have to rely on hope. Here are my notes, mostly reconstructed from the slides I photographed. The slides were in Russian, so the translations and any mistakes in the retelling are mine.

The problem: autonomous sessions plus rules, with no control

The starting point will be familiar to anyone who has given an agent a long task: you write good rules, the agent works on its own for a while, and the result slowly drifts away from what you asked for. The talk broke this into three causes, each living in a different part of the model:

  • Mirroring. The model copies the shape of the code it sees, legacy patterns included. If the file next to it does something the old way, the new code will too. This comes from attention itself (the slide pointed at induction heads).
  • Training corpus. Your rules compete with very strong habits learned in training (the MLP layers and RLHF). One line in a rules file is up against millions of examples that do it differently.
  • Echo bubble. The deeper the session goes, the more of the context is the model’s own earlier output. It starts reasoning from its own summaries and guesses instead of from the code.

Put together: autonomous sessions + rules, without a control mechanism → drift.

Context rot

The second part was the theory behind what most of us just call “the session got dumb”. The talk called it context rot: answer quality quietly degrades as the context grows. Three mechanisms:

Slide: what is context rot — lost in the middle, attention dilution, distractor interference

  1. Lost in the middle. Models use information at the beginning and end of a long context better than information in the middle. This is a known result for transformer models (Liu et al., “Lost in the Middle: How Language Models Use Long Contexts”).
  2. Attention dilution. Self-attention spreads a fixed budget over all tokens (the weights sum to one). More tokens means less attention for the ones that matter.
  3. Distractor interference. A wrong conclusion from the model, or from you, goes back into the context and becomes a source for new mistakes. It’s a positive feedback loop, and it gets worse the longer the conversation runs.

None of this is new research. But seeing it laid out next to real coding failures made it click for me. A long session isn’t just slower and more expensive. It gets worse, in a way you won’t notice from inside it.

Session triplets: reset the context, not the knowledge

The core of the solution: don’t run one long session. Split the work into three sessions, each with a fresh context and its own question.

Slide: session triplets — brief, plan, implement, each in a new context

  • Brief: What exists now, what are we changing, and what don’t we know? The what and the why, but not the how. Its most important section is caveats / unknowns: an honest list of what isn’t known, with an owner for every open question. Input: a design spec or ticket. Output: brief.md.
  • Plan: How exactly will we do it? Concrete decisions, files, steps. Every statement is either confirmed by the user or inferred, with a justification. There is no third bucket. Input: the brief plus a question-and-answer session. Output: plan.md.
  • Implement: mechanical work that follows the plan. It starts with a reconcile step, where the plan is checked against the actual code. The plan is the intent; the code is the truth. Input: plan.md. Output: code and tests.

The key line from the slide: what passes between sessions is not the context, it’s an artifact on disk. It has to be self-contained. If the plan can only be executed by someone who remembers the conversation, the plan isn’t ready.

They used Opus for brief and plan, and Opus or Sonnet for implementation.

This one hit close to home. My own agent setup works on the same idea, just less formally: the VM can disappear at any time, so everything important goes into NOTES.md and git rather than living in the chat. I did that for durability. The talk made me realise it’s also a quality tool.

An antidote for each failure

The talk then mapped each failure mode to a specific countermeasure:

Slide: an antidote for each failure mode

FailureAntidote
MirroringGive a pattern and an anti-pattern, with line references: what to copy and what not to.
Training corpusThe user’s decisions are written down word for word and closed for re-discussion (“locked decisions”).
Echo bubbleA new session gets the document, not the chat history.
Context rotEnd the session before the attention budget runs out. Their experience: roughly 300–400K tokens on Opus.
DriftReconcile at every session boundary: every path and signature is checked against the code.

No silent assumptions

Next were five rules for how the agent should talk about what it knows. I liked these a lot, because each came with a “bad” and “good” example:

  1. Verify before you claim. A file:line reference, or it’s not a fact. Not “the cancel flow already handles cleanup”, but “status.go:42: StatusCancelled triggers cleanup”.
  2. Unverifiable means labelled. Assumptions aren’t forbidden; unlabelled ones are. “Probably it’s in the service…” becomes “Unverified assumption: …” or “Inference: …”.
  3. Two buckets, not three. Confirmed, or inferred with a reason. “I assumed that…” becomes “Conclusion: … — safe because …”.
  4. A check needs an expected result. Otherwise it’s a ritual. Not go test ./..., but go test ./internal/foo/... → exactly one record.
  5. A position, not a question. Check first, then name the evidence. Not “Did you do step 5?”, but “Step 5 adds a flag nobody reads; I’d postpone it (file:line).”

Plus two hard stop rules: if there are more than three mismatches between the brief and the code, stop; if a mismatch changes the scope, stop. Then a human looks at it.

Take control out of the context

The last idea I wrote down was maybe the most important: everything that lives in the context degrades along with it. What lives outside it holds.

Slide: take control out of the context — hooks, skills, a model from another family

CLAUDE.md, rules files, memory and output styles all sit inside the model’s context, so they’re subject to everything above. The talk suggested three things that sit outside:

  • Hooks. “A rule is a request. A hook is a guarantee.” Hooks are the only deterministic way to make Claude Code do the right thing at the right moment.
  • Skills. A playbook on demand. More reliable than a wall of text in the prompt, and it only uses context when it’s actually needed.
  • A model from another family as an observer. Different weights and different training data, so the working model can’t “talk it round” with its own context. It watches through hooks and comments without being asked.

Tools mentioned

For the planning phase, the talk pointed to three open-source skill sets for Claude Code:

  • gstack: its “office hours” skill fits planning well.
  • grill me: keeps asking questions until everything adds up to one coherent decision.
  • superpowers: a structured design dialogue through context, questions, design and spec.

What I’m taking away

My main takeaway is a change of mindset. I used to treat a degrading session as bad luck, or a sign I needed a better prompt. This talk treats it as a property of the system that you design around: short sessions with one job each, artifacts instead of chat history, claims backed by file:line, and the important controls kept outside the context where they can’t rot.

I’m going to try the brief → plan → implement split on my next non-trivial task and see how it compares. Thanks to Alexandr for a talk with real substance, and to maib for hosting.