Context and memoryCoding agents
A Google DeepMind engineer deleted most of his agent rules for Gemini 4 Neon
In a post dated 25 November, Philipp Schmid describes five changes he made to his context setup after weeks of evals and daily work with Gemini 4 Neon: fewer rules, tool rules stated once in the schema, skills loaded on demand, visual checks, and handoff files instead of compaction. His conclusion is that most long agent prompts are old workarounds for weaker models.
System instructions, repository files, tool definitions, skills and past turns fill most of what a coding agent sees, and unlike a single prompt they apply to every later request. Schmid's rules had grown one at a time: one against noisy comments from an older model, another against edits he did not ask for. Over time his user rules, project rules and current request began to contradict each other; a blanket ban on comments clashes the moment he asks the agent to document a public function. With Gemini 4 Neon, he writes, conflicting instructions cost extra thinking tokens, and the model often followed the older rule instead of his request.
He replaced rigid code-style bans with judgment cues, such as matching the surrounding code's style, naming and comment density, and says this cut wasted thinking and raised accuracy. His user-level GEMINI.md now fits on one screen and keeps only habits for every session: limits around approvals, checking claims against primary sources, timers for long jobs and the format of replies. Tool rules he used to state twice, in the system instructions and in the tool description, now live once in the tool's JSON schema, with types, enums and required fields. He deleted few-shot examples, because when a task differs from an example the model copies extra fields or the wrong argument shape and sends invalid calls.
He also deleted almost every project-level AGENTS.md and GEMINI.md, which mostly repeated directory layouts the model can read for itself or had turned into stale memory logs. A project file now holds a short summary and the gotchas the code does not show, such as an unusual test command. Domain workflows moved into skills listed with a one-line description in an index and split into linked files as they grow, which he says pays off most for fast-changing CLIs, SDKs and internal APIs. For visual work he gives reference screenshots or short recordings, and has the agent render its output and inspect the actual image before it finishes.
On long sessions he writes that compaction always hurts: summarizing mid-task breaks the prompt cache, drops line-level detail and makes the model re-read files it had already opened. He splits the work instead. When a task changes phase, the agent writes a handoff file with the goal, verified decisions and exact file paths, and a new session starts from it; a second track of work gets a forked session. For anyone who keeps automatic compaction as a fallback, he suggests not triggering it early, around 500k tokens in his case, with active file paths and verified decisions kept in the summary.
