Using GridTerm with Aider: Open Source AI Pair Programming
Aider is an open-source AI pair programming tool that runs in your terminal. It connects to multiple LLM backends — Claude, GPT-4, local models — and edits your code through a conversational interface. It’s one of the most popular open-source alternatives to proprietary AI coding tools.
Running Aider in a single terminal works fine for focused tasks. Running it in multiple terminals across a grid layout turns it into something much more powerful.
What makes Aider different
Aider takes a focused approach to AI coding. You add files to the chat context, describe what you want changed, and Aider edits those files directly. It understands git, creates commits for its changes, and can work with your repo’s existing history.
Key features:
- Multi-model support — Works with Claude, GPT-4, GPT-3.5, local Ollama models, and more
- Git-aware — Creates commits for changes automatically
- File context — You explicitly add files to the conversation
- Architect mode — Separates planning from implementation with different models
- Cost control — Choose cheaper models for simpler tasks
Aider + GridTerm workflow
The multi-agent pattern works especially well with Aider because of its explicit file context model. Since you tell Aider which files to work on, multiple sessions won’t conflict if they’re touching different files.
Basic setup (2x2 grid)
Open GridTerm, select a 2x2 layout:
| Terminal | Task |
|---|---|
| Top-left | aider — working on backend API routes |
| Top-right | aider — working on frontend components |
| Bottom-left | Dev server (npm run dev) |
| Bottom-right | Git operations and testing |
Power setup (2x3 grid)
For larger projects:
| Terminal | Task |
|---|---|
| Top-left | aider --model claude-3-opus — complex refactoring |
| Top-center | aider --model claude-3-haiku — simple edits, docs |
| Top-right | aider — tests and fixtures |
| Bottom-left | Dev server |
| Bottom-center | git log, git diff, manual review |
| Bottom-right | npm test — running tests |
Notice the model mixing. Use a more capable model for complex tasks and a cheaper model for straightforward work. Aider makes this easy because you specify the model per session.
Mixing Aider with other agents
One of GridTerm’s strengths is that each terminal is independent. You can run Aider in some panes and Claude Code in others.
A practical setup:
- Aider for focused file editing where you want explicit control over which files are in context
- Claude Code for broader codebase tasks where you want the agent to figure out which files to modify
- Free terminals for git, testing, and server processes
Different tools for different task shapes, all visible at once.
Saving your Aider workspace
Once your layout is configured, save it as a GridTerm workspace. Set auto-commands to launch Aider with the right model and directory:
- Terminal 1:
cd ~/project/backend && aider --model claude-3-opus - Terminal 2:
cd ~/project/frontend && aider --model claude-3-haiku - Terminal 3:
cd ~/project && npm run dev
Tomorrow, load the workspace and everything starts automatically.
Tips for multi-session Aider
Avoid file conflicts. Don’t add the same file to multiple Aider sessions. Since Aider edits files directly, two sessions modifying the same file will create conflicts. Split by module or directory.
Use architect mode for planning. Launch one Aider session in --architect mode to plan changes with a strong model, then use other sessions to implement the plan with faster models.
Leverage screenshots. If you need to share an error from one terminal with another agent, use GridTerm’s screenshot feature — capture the error and paste it into the other session.
Check git between prompts. Keep a free terminal for git diff and git log so you can review what each Aider session has committed before prompting more changes.