Source: How my context engineering changed for Gemini 4 Neon, Philipp Schmid, 25 Nov 2026. Found via TLDR AI 2026-11-26. Three diagrams are available only as alt text.
Thesis
"Most long agent prompts are old workarounds for weaker models." Overly specific rules eventually clash with the actual request, and conflicting instructions make the model spend thinking tokens resolving them, sometimes in favour of the old rule.
The five changes
Replace strict rules with judgment cues. A blanket ban on code comments clashes with "document this public function". It became "match the surrounding codebase's style, naming and comment density". The user-level GEMINI.md now fits on one screen: show diffs before pushing or deploying, verify claims against primary sources, set a timer for long jobs, front-load answers, and a few prose-style rules. Task-specific material moved into skills.
State each tool rule once, in the schema. Usage rules repeated in system prompt and tool descriptions, and all few-shot examples, were removed. Constraints moved into typed JSON schema: enums, required fields,
additionalProperties: false(for example anupdate_planstatus enum of pending, in_progress, done, skipped). Few-shot examples narrowed edge-case handling and the model copied their extra fields and argument shapes. The tool surface was kept small, overlapping search tools were removed, and long logs go to files, not stdout.Load skills only when needed. Nearly all project AGENTS.md and GEMINI.md files were deleted, since they had repeated the directory layout or become stale append-only logs. What remains is a short repo summary plus gotchas the model can't infer (a non-standard test command, the one file holding shared types). Domain workflows became skills with a one-line index entry; long skills are split into linked files. He reports almost no false triggers, without numbers.
Verify with images and video. Paragraphs of CSS rules were replaced by a reference screenshot or recording; the agent renders its output and inspects it before declaring done. Text is still fine for backend work.
Hand off instead of compacting. "Compaction always hurts": it breaks the prompt cache, loses line-level detail and forces re-reads. At a phase change the agent writes a handoff file (goal, verified decisions, exact file paths) and a fresh session starts from it; parallel tracks fork the session. Where automatic compaction stays as a fallback, "around 500k tokens is a good target" even with a 1M window.
Engineering takeaways
Audit prompts when the model changes; rules written for an older model's failure modes cost thinking on the new one.
Schema constraints beat prose rules for tool calls, and few-shot examples can harm argument shape.
Project memory files should hold only what can't be inferred from the repo; everything else is a skill or the code itself.
A deliberate handoff file is a cheaper, more faithful context reset than compaction.
Caveats
One practitioner's account, no benchmark, no before/after token counts or success rates. Claims about Gemini 4 Neon specifically are not independently checked.
Related
R340 (model-managed compaction in an agent harness), R336 (Obsidian's connectors as skills), R314 (plugins that fetch skills on demand).