Back to articles

Making Gemini Coding Agents Work Better Starts with Pruning Old Rules

3 min read

Introduction

A coding agent responds to more than the prompt a user has just entered. System instructions, tool definitions, project notes and conversation history also occupy its context. If those materials are outdated or repetitive, they can distract from the task at hand. Philipp Schmid, a Google DeepMind engineer, describes five changes he made while working with Gemini 4 Neon. Taken together, they are best understood as a method for managing context—not as a universal prompt template.

Five changes focused on reducing noise

1. Keep global instructions short. Rules added to compensate for older models can become counterproductive when they conflict with a new request. A global ban on comments, for example, may clash with a task that asks for documentation on a public function. Schmid suggests reserving user-level guidance for requirements that apply across projects, such as safety checks and response preferences. For code style, he prefers letting the agent follow the repository’s existing conventions and handling specialized workflows separately.

2. Put tool constraints in the interface. Repeating parameter rules in both tool descriptions and system instructions consumes context without necessarily improving clarity. Types, required fields and allowed values can instead be specified directly in an interface or JSON Schema. Examples may help with common cases, but an agent can also copy their fields into a situation where they do not fit. Schmid also recommends trimming redundant tools and limiting bulky outputs: save long logs and read only relevant sections when needed.

3. Load project guidance selectively. Project instructions are most useful when they explain facts that cannot be inferred from the code, such as a nonstandard test command or a required location for shared types. Longer procedures can live in separate Skills and be loaded for relevant tasks. Documentation for frequently changing tools should be kept current. The point is not to discard useful information, but to avoid placing every instruction in every session from the start.

4. Use visual references—and inspect the result. Text alone may leave too much room for interpretation in work involving layouts, diagrams or motion. Screenshots and short recordings can communicate the intended look more directly. After implementation, the agent should inspect the rendered page, chart or video frame for issues such as misalignment, awkward wrapping or clipped text. A successful code change does not by itself establish that the visual result is correct.

5. Hand work off between stages. Even a large context window can become cluttered during a long session. Rather than relying entirely on automatic compaction, Schmid prefers creating a brief handoff at stage boundaries: record the goal, decisions already made and relevant file paths, then continue in a fresh session. Parallel work can be split into separate sessions. He treats automatic compaction as a fallback rather than something to trigger too early.

The broader takeaway: design the information flow

All five suggestions point toward treating context as a resource to manage. Keep stable rules global, load project details when needed, express tool requirements through interfaces and make transitions between stages explicit. Whether these changes improve a particular workflow still depends on its tools, codebase and model, so teams should verify tool calls and outputs after revising their setup. For coding-agent users, reviewing accumulated instructions may be a more useful first step than adding another prohibition.

Source: QbitAI

Comments

Checking sign-in status...

Loading comments...

Related articles