Source: Preliminary findings from the JetBrains Developer Ecosystem Survey 2026 • 15,000+ developers worldwide


Mistake
Why it causes problems
Better pattern
Vague task scope
Agent interprets the goal broadly and makes unintended changes
Define the exact file paths, functions, or systems in scope
No tool guidance
Agent calls tools unnecessarily or misses required ones
Specify which tools to use and when, and forbid redundant calls
Add explicit stop conditions, including max retries, ambiguous goals, and failed permissions
Allowlist specific directories, APIs, or commands, the way Junie's Action Allowlist governs which actions run without approval
Define the exact schema, fields, and types expected
Require the agent to check test results, diffs, or schema conformance before finishing
Make the "do nothing if not needed" case explicit
Agent retries indefinitely or escalates without reporting
Agent modifies files or systems outside the intended scope
Output can't be consumed by downstream steps
Agent marks tasks complete without verifying results
Agent creates tasks or calls tools to appear thorough
Missing stop rules
Overly broad permissions
Weak output format
No validation criteria
Instructions that encourage unnecessary actions
Tactic
Action / Prompt example
Narrow task scope
Name the exact file, function, or system. "Update the /users endpoint in src/routes/users.ts to return 404 on missing IDs" rather than "update the API".
State allowed and disallowed actions
"You may read and modify files in src/. Do not run database migrations or modify environment files."
Define the exact format: "Return a JSON object with status, changes, and errors fields."
"Run the full test suite and include the pass/fail result in your output before marking the task complete."
"If you encounter a permissions error or cannot determine the correct action, stop and report the blocker."
"A correct summary includes file path, line number, and function name. An incorrect summary says only 'file was changed'."
Each instruction should have one clear meaning. Conflicting rules (such as "be thorough and minimize changes") cause unpredictable behavior.
Require structured output
Set validation rules
Define escalation conditions
Include examples of good and bad behavior
Keep prompts concise and non-conflicting
A reliable signal is inconsistency, where the same prompt produces different scopes of change across different runs. If an agent sometimes edits one file and sometimes rewrites a whole module for the same task, the task instructions are too open-ended. Adding specific file paths, function names, or explicit scope limits usually resolves the inconsistency.
Prioritize explicitly. If an agent receives both "be thorough" and "minimize changes", it will resolve the conflict arbitrarily. Make precedence clear: "Minimize changes unless test coverage would drop below the project threshold." When two instructions genuinely conflict, pick one and remove the other, because an agent settles the ambiguity on its own – and rarely in the way you intended.
Yes, and this is a common source of silent failures. If a prompt instructs an agent to modify a file that the tool's permission model blocks, the agent may either fail without reporting it or find a workaround you didn't intend. The practical fix is to align prompt constraints with the actual tool permissions, so if the tool can't write to production config, the prompt should also state that explicitly.
When the same rule appears in multiple prompts, it belongs in a shared layer, such as tool configuration, system-level instructions, or a policy file that the agent always loads. JetBrains Air handles this with project instructions that every task in a project inherits. Permissions, output schemas, and escalation conditions are good candidates: They rarely vary by task, and repeating them in every prompt makes them hard to update consistently.
Damaso Sanoja is an engineer who is passionate about helping others make data-driven decisions to achieve their goals. This has motivated him to write numerous articles on the most popular relational databases, customer relationship management systems, enterprise resource planning systems, master data management tools, and, more recently, data warehouse systems used for machine learning and AI projects. You can blame this fixation on data management on his first computer being a Commodore 64 without a floppy disk.
Explore JetBrains AI solutions that help you build, use, and scale AI agents across the software development lifecycle.
Run terminal agents through one JetBrains account, with access, models, and usage governed centrally.
Plan, code, debug, and automate tasks with a coding agent that works across your terminal, IDE, GitHub, and GitLab.
Orchestrate AI agents and verify their output directly in JetBrains IDEs, with full control over how changes are reviewed.
Automate software delivery workflows, coordinate agentic work across teams, identify bottlenecks affecting delivery.
Govern AI usage, models, policies, and costs across your organization, including JetBrains and third-party tools.
Give agents shared organizational memory and context that carries across tools, workflows, and execution environments.
An open system of AI products for developers, teams, and organizations – from coding with agents to automating workflows and governing AI at scale.
Continue Exploring the AI Agents for Developers Guide
Explains how AI agent loops work, why infinite loops occur, and practical techniques for preventing runaway execution in production systems.
Learn how to manage AI agent context windows, reduce context loss, and improve performance, accuracy, and reliability in long-running workflows.
Explores AI agent architecture, including core components, planning, memory, tool use, orchestration, and design patterns for building reliable AI agents.