The Deska blog
Which Agent Follows Instructions Best?
Discover which agent follows instructions best through a series of developer tests comparing reasoning models and tool use in a local-first workspace.
· 10 min read
Determining which agent follows instructions best requires looking beyond simple chat interactions and analyzing how these tools execute complex, multi-step tasks in a real file system. For developers, instruction following is the difference between a tool that builds a feature and one that creates technical debt. This experiment evaluates how different AI entities handle constraints, edge cases, and architectural requirements when given specific developer prompts.
The Problem with Instruction Following
Most LLMs perform well in sandbox environments. However, when an agent is tasked with modifying an existing codebase, the failure rate often increases. Common failures include ignoring specific formatting rules, forgetting to handle errors, or over-complicating a simple request.
Testing which agent follows instructions best involves measuring three specific criteria. First, the agent must adhere to the provided constraints without deviation. Second, it must maintain the context of the entire project. Third, it must correctly utilize the available tools, such as terminals or file systems, to verify its own work.
Methodology for the Agent Experiment
To test these tools fairly, we use a set of standardized tasks ranging from refactoring legacy code to implementing new API endpoints. We observe how different models and interface approaches handle these requests.
- Constraint Adherence: Can the agent use a specific library if told to avoid another?
- Logic Consistency: Does the agent maintain variable naming conventions across multiple files?
- Tool Accuracy: Does the agent check for existing processes before starting new ones?
When running these tests, the environment matters as much as the model. Using a tool like Deska allows us to run coding agents like Claude Code and Codex CLI side by side. This setup provides a clear view of how different agents interact with the same local files in real time.
Comparing Agent Architectures
Different agents take different paths to fulfill a request. Some are highly autonomous, while others require constant human feedback.
Claude Code
Claude Code focuses on high-level reasoning and terminal-based interaction. It tends to be very conservative with file edits, often summarizing its plan before execution. In our tests, it excels at following complex architectural patterns. It rarely skips steps, though its thoroughness can sometimes result in slower execution times compared to lighter agents.
OpenCode and Codex CLI
These agents often prioritize speed and direct file modification. OpenCode is particularly effective when you need a straightforward implementation of a standard pattern. However, without strict prompting, it may occasionally overlook minor constraints mentioned at the beginning of a long instruction set.
Ask Deska
Within the canvas workspace, Ask Deska functions as a coordinator. It does not just write code; it drives the workspace. If you ask it to set up a debugging environment, it can open terminals and browser widgets automatically. This represents a different type of instruction following where the agent understands the developer's physical workflow rather than just the text in a file.
Why a Local-First Approach Matters
Instruction following is more reliable when the agent has direct access to the source of truth. Cloud-based editors often rely on fragmented snapshots of your code. A local-first environment ensures that the agent sees exactly what you see.
When you use Deska, your code and git files stay on your machine. This means the agent can run local tests to verify if it actually followed your instructions. If a test fails, the agent can see the terminal output immediately and correct its course without manual intervention.
Results from the Instruction Tests
In our comparison, the winner often depends on the complexity of the instruction. For simple refactors, OpenCode was the fastest. For architectural changes that required following a specific design pattern across five different files, Claude Code demonstrated superior instruction following.
The most successful workflows involve using these agents as specialized panels. By placing different agent panels on an infinite canvas, you can compare their outputs for the same prompt. This side-by-side analysis reveals that while one model might be better at logic, another might be better at CSS or documentation.
Managing Agent Sessions
Effective instruction following also depends on how you manage the history of the conversation. In Deska, agent threads allow you to keep track of previous commands and context. If an agent starts to deviate from your instructions, you can reset the thread or provide a clarifying prompt to bring it back on track.
Mobile Monitoring and Remote Work
Sometimes you start a long-running task and need to step away from your computer. The Deska mobile app allows you to monitor the progress of your agents through a secure relay. You can see if the agent is following the instructions you left it and even send a quick text instruction to correct it if you see it going in the wrong direction.
FAQ on Agent Instruction Following
Which AI model has the best instruction following for code?
Currently, models like Claude 3.5 Sonnet and GPT-4o are considered leaders in instruction following. The effectiveness often depends on the system prompt and the tools the agent is allowed to use within the developer environment.
How do I stop an AI agent from ignoring my instructions?
The best approach is to provide clear, bulleted constraints and to use a tool that maintains a persistent session. Using specific settings to define the agent's persona and limits can also help prevent it from hallucinating or skipping steps.
Can I run multiple AI agents side by side?
Yes, using a workspace like Deska allows you to run multiple agents in separate panels. This is useful for verifying instructions by seeing how two different models interpret the same complex prompt.
Start Testing Agents Today
The best way to find out which agent follows instructions best for your specific workflow is to test them on your own projects. You can run multiple agents side by side and see their reasoning processes in real time.
Download the free desktop app for Mac, Windows, and Linux at /download and start building your own agent testing workspace.