The Deska blog

Moving Your Config Between Agents

Learn strategies for moving your config between agents like Claude Code and OpenCode to ensure portability and consistency in your development workflow.

· 10 min read

The rapid evolution of autonomous coding tools has introduced a new challenge for the modern developer: agent config portability. When you spend hours fine-tuning system prompts, ignore rules, and environment variables for a specific AI agent, you do not want to lose that context when switching to a different tool. Ensuring that your configuration can move seamlessly between different agents is essential for maintaining a consistent development velocity and avoiding the friction of repetitive setup tasks.

Understanding the Landscape of Agent Configuration

Coding agents typically rely on a combination of global settings and project-specific instructions to function effectively. These configurations dictate how the agent interacts with your file system, which files it should ignore, and the specific coding standards it must follow.

Most modern agents like Claude Code, OpenCode, and Codex CLI look for specific configuration files in your root directory. While the file names differ, the underlying logic remains similar. The challenge lies in the lack of a universal standard for these settings. A rule defined in a .claudecode.json file might not be automatically recognized by another agent unless you manually bridge the gap.

Common Configuration Components

To achieve true agent config portability, you must first identify the three main pillars of agent instructions:

  • Environmental context: This includes your preferred shell, path variables, and API keys.
  • Project constraints: These are usually defined in files like .gitignore or agent-specific ignore files to prevent the AI from indexing large build folders or sensitive data.
  • Behavioral instructions: These are the system prompts or "rules for AI" that define how the code should be written, such as "always use TypeScript" or "prefer functional components over classes."

Strategies for Portable Configurations

Achieving portability requires a proactive approach to how you store and reference your settings. Instead of relying on a single agent to manage your preferences, you should treat your configuration as a standalone asset.

The Source of Truth Approach

One effective method is to maintain a master markdown file within your project repository, often named AI.md or INSTRUCTIONS.md. Most coding agents are capable of reading the current directory. By explicitly telling your agent to check this file for rules, you create a portable source of truth that any agent can consume.

Symlinking and Config Mapping

For tools that require specific file names in the home directory or project root, you can use symbolic links. This allows you to edit a single configuration file and have those changes reflected across multiple agents simultaneously. For example, you might link a central global-rules.json to both an OpenCode config and a custom CLI tool.

Managing Multiple Agents in a Single Workspace

As workflows become more complex, developers often find themselves running multiple agents side by side to compare outputs or handle different parts of a project. This is where the concept of a unified workspace becomes valuable.

Tools like Deska allow you to run Claude Code, Codex CLI, and OpenCode in separate panels within an infinite canvas. Because these agents run as terminals or specific coding agents panels, they all access the same local file system. This local-first architecture ensures that any change you make to a configuration file is immediately visible to every agent active in the workspace.

Advantages of Local-First Portability

When you adopt a local-first approach, your configuration files stay on your machine rather than being locked into a proprietary cloud database. This provides several benefits:

  1. Version Control: You can commit your agent configurations to Git, allowing team members to share the same setup.
  2. Privacy: Sensitive instructions and project structures are not uploaded to external servers for configuration management.
  3. Offline Access: Your rules and ignore patterns remain functional even without an internet connection, provided the agent itself supports local execution.

Bridging the Gap Between Different AI Models

Configuration portability is not just about files; it is also about how different models interpret instructions. A prompt that works perfectly for Claude 3.5 Sonnet might produce different results when used with a Llama 3 based agent.

To mitigate this, keep your behavioral instructions concise and declarative. Avoid model-specific jargon. Instead of saying "Use the Claude style for documentation," use "Follow the Google Python Style Guide for all docstrings." This makes your configuration more resilient when you decide to switch underlying models or service providers.

The Role of Advanced Workspace Orchestration

In a sophisticated setup, you might use an assistant like Ask Deska to manage your workspace state. If you have a specific way you want your agents configured, you can use voice or chat commands to trigger scripts that reconfigure your environment. For instance, you could command the assistant to "set all active terminals to the production environment," ensuring that every agent panel respects the same set of constraints.

For developers who need to move between machines, using a mobile app to monitor these sessions can be helpful. However, the core configuration should always reside within the local project structure to ensure that any device you use can pick up exactly where the last one left off.

Decision Guide: When to Centralize Configs

Configuration TypeBest PracticePortability Level
Ignore RulesUse .gitignore as a baseHigh
API KeysUse .env files or system variablesMedium
Coding StandardsDedicated RULES.md fileHigh
Agent BehaviorAgent-specific config filesLow

FAQ

How do I share AI agent rules with my team?

The most reliable way is to include a .cursorrules or AI.md file in the root of your repository. Most modern coding agents are designed to look for these files automatically. This ensures that every developer on the team, regardless of their specific agent choice, follows the same architectural guidelines and coding patterns.

Can I run multiple coding agents on the same project?

Yes, you can run multiple agents simultaneously. Using a workspace that supports panels allows you to see the output of different agents like Claude Code and OpenCode side by side. This is particularly useful for debugging or when you want to cross-reference how different models approach a complex refactoring task.

How do I protect my API keys when moving configs?

Never hardcode API keys directly into your agent configuration files. Use environment variables or a dedicated secrets manager. For those using Deska, the BYOK (Bring Your Own Key) model allows you to input your keys once at the application level, keeping them separate from your project-specific logic and configuration files.

Start Building Your Portable Workflow

Maintaining a portable configuration is a long term investment in your productivity. By decoupling your rules and settings from any single tool, you remain agile and ready to adopt new technologies as they emerge.

If you are looking for a workspace that respects your local-first workflow and allows you to run multiple agents side by side on an infinite canvas, you can download Deska for Mac, Windows, and Linux. It provides the infrastructure needed to manage these agents effectively while keeping your data and configurations under your control.

💡 Ideas+🐛 BugsSuggest a feature or report a bug