The Deska blog
Etiquette for AI Pair Programming: Who Types When
Master the etiquette for AI pair programming. Learn how to manage the rhythm between human developers and AI agents for maximum productivity.
10 min read
The transition from traditional coding to a collaborative model with large language models requires a clear understanding of etiquette for AI pair programming to avoid friction. When two humans pair program, they occupy the roles of driver and navigator. One person types while the other reviews the high level strategy. With AI agents, these roles blur because the AI can type significantly faster than any human, but it lacks the contextual intuition to know when to stop. Establishing a rhythmic etiquette ensures that the AI remains a tool for acceleration rather than a source of technical debt or confusing merge conflicts.
The Power Dynamic of the Digital Driver
In a standard pair programming session, the driver is the person with their hands on the keyboard. When working with AI, you are often the navigator while the agent acts as the driver. However, the etiquette for AI pair programming dictates that the human must retain "interrupt authority." Because agents like Claude Code or Codex CLI can generate dozens of lines of code in seconds, the human must be ready to pause the generation if the logic begins to drift.
The friction in this relationship usually comes from a lack of boundaries. If you allow the AI to drive for too long without checking the output, you lose the mental model of your own application. Effective etiquette suggests a cycle of short bursts: you provide a specific prompt, the AI generates a focused implementation, and then you immediately pivot to a review phase.
Defining the Working Rhythm
A successful rhythm depends on knowing when to step in and when to let the agent execute. You can categorize these moments into distinct phases of the development lifecycle.
- Architectural Sketching: You should always be the one to define the patterns. Do not ask an AI to simply build a feature. Instead, tell it which design pattern to use, such as a factory or a hook, and let it fill in the boilerplate.
- Refinement: This is where the AI shines as a driver. If you have a working but messy function, hand the keyboard to the AI to clean up the syntax or improve efficiency while you watch the diffs.
- Debugging: This requires a collaborative back and forth. You provide the logs and the AI suggests hypotheses. Etiquette here means not blindly running every fix the AI proposes without understanding the root cause.
Tools for Visualizing the Interaction
The environment where you host this collaboration changes how you interact with the agent. Many developers use integrated sidebar extensions, which can feel cramped or disconnected from the actual file structure. This is where a more open layout becomes beneficial.
In Deska, for example, the infinite canvas workspace allows you to place multiple coding agents side by side. You can have a terminal running Claude Code in one panel and a standard terminal for your own commands in another. This prevents the "hidden driver" problem where an AI is making changes you cannot see. By seeing the agent work in a dedicated panel while you monitor the code editor, you maintain a better oversight of the session.
Because Deska is local-first, the sessions and files remain on your machine. This provides a layer of security and speed that is essential when you are frequently swapping who is "typing" during the session.
Comparison of AI Integration Styles
Different tools approach the driver and navigator roles with varying philosophies. Understanding these can help you decide which etiquette fits your team.
| Tool Style | Primary Interface | Driver Role | Navigator Role |
|---|---|---|---|
| IDE Plugins | Inline autocomplete | AI suggests ghost text | Human accepts or rejects |
| CLI Agents | Terminal interface | AI writes files directly | Human reviews git diffs |
| Canvas Tools | Open workspace | AI runs as a panel | Human orchestrates multiple panels |
While IDE plugins are excellent for low level syntax completion, CLI agents and canvas based workspaces like Deska are better suited for higher level architectural tasks. In Deska, the Ask Deska assistant can even drive the workspace itself, opening panels or running commands based on your voice or chat input. This shifts the etiquette from "typing" to "orchestrating."
Managing State and Context
A major part of etiquette for AI pair programming is maintaining a clean context. If you give the AI too much irrelevant information, its "driving" becomes erratic. You must be the curator of what the AI sees.
- Prune your context: Close files that are not relevant to the current task.
- Provide clear entry points: If you want the AI to fix a bug, point it directly to the relevant notebook or notes.
- Review every commit: Never let an AI commit directly to your main branch without a human sign-off on the diff.
When you are away from your desk, the etiquette of the session might change to a monitoring role. Using the Deska mobile app, you can monitor the progress of long running tasks or check on the status of an agent through a secure relay. This allows the AI to continue "typing" or processing while you navigate from a different device, provided you have set the initial guardrails.
Ethical and Professional Considerations
Pairing with an AI is not just about speed. It also involves the responsibility of the code produced. Professional etiquette requires that you treat AI generated code as if you wrote it yourself. If there is a bug, saying "the AI did it" is not an acceptable excuse in a professional setting.
You should also consider how you use your API keys. Using a BYOK model allows you to control your costs and choose the model that best fits the specific task. Some models are better drivers for Rust, while others excel at Python or documentation. Swapping models depending on the task is a high level navigator skill.
FAQ: Common AI Pair Programming Questions
How do I stop an AI agent from overwriting my manual changes?
The best way to prevent conflicts is to work in different files or to use a workspace that clearly highlights file changes. Effective etiquette involves committing your manual work before triggering an AI agent to perform a task in the same directory. In a multi panel environment, you can keep your active file visible while the agent works on a separate utility or test file.
Is AI pair programming secure for private company code?
Security depends on how the tool handles your data. A local-first approach ensures that your code and session data stay on your machine rather than being stored on a third party server. Always check if the tool uses your code for training. Tools that allow you to use your own API keys typically offer more control over data privacy settings.
What is the best way to prompt an AI for complex refactoring?
Instead of a single large prompt, break the refactoring into smaller, logical steps. Start by asking the AI to explain the current logic. Once you agree on the explanation, ask it to propose a new structure. Finally, tell it to execute the code changes. This step by step approach is the core of professional etiquette for AI pair programming.
Building Your Workspace with Deska
Successfully implementing these etiquette rules requires a tool that adapts to your workflow. Deska provides the flexibility of an infinite canvas where you can run Claude Code, Codex CLI, and OpenCode as panels side by side. This visual clarity makes it easier to manage the rhythm of who types when.
Whether you are using the free desktop app or opting for managed inference as a subscriber, the goal is to create a seamless collaboration between human intent and machine execution. You can start building your collaborative environment today by visiting the download page and setting up your first local workspace.