How One Developer Simplified Context Engineering for Gemini 4 Neon
Key point
Drawing on weeks of evals and daily use, the author recommends leaner agent context for Gemini 4 Neon and describes around 500k tokens as a personal target before compacting.
Details
- After weeks of evals and daily use, the author found that guardrails and rules written for older models could slow Gemini 4 Neon or hinder it on edge cases, and describes five changes to make the context leaner.
- Global instructions: keep user-level GEMINI.md to one screen with universal safety habits and reply preferences; replace rigid code-style bans with judgment cues. The author says this reduced wasted thinking and raised accuracy.
- Tools and skills: for custom agents, define tool rules once in JSON schemas with clear parameter types and enums, removing duplicated system rules and few-shot examples. Keep project files to a brief repo summary and genuine gotchas, and load lightweight skills only when needed.
- Visual checks and handoffs: use reference screenshots or recordings for visual work and inspect rendered outputs. The author says long sessions can get noisy even with a 1M-token context window, and recommends handoffs between phases. For an agent loop with automatic compaction, around 500k tokens is the author’s personal target before compacting, not a universal threshold.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.