Working with Multiple Orgs
Best practices for multi-org and cross-org workflows like migrations and duplicating configurations
When working across multiple Salesforce orgs — whether you're migrating configurations, duplicating setups, or using one org as a reference for building another — it's important to follow a workflow that keeps your orgs safe and separate.
Cross-org pollination risk. If the same agent has write access to both a reference org and a target org, there's a possibility of unintended changes being made to your reference org. This is especially important for larger integrations where the scope of changes is significant.
Best Practice: Two-Agent Workflow
The recommended approach for migrating or duplicating items from a read-only reference org to a new target org is to use two separate agents — one for planning, one for building.
Assess with your reference org in Plan Mode
Start a new agent with your reference org connected. Set the agent to Plan Mode so it has read-only access. Have the agent assess what you want to migrate and capture everything into a detailed plan.
This gives you a complete picture of the source org's configuration without any risk of modifying it.
Build in your target org using the plan
Start a second agent with your target org connected. Select the existing plan from the first agent as a reference, then run your build.
The second agent executes against only the target org, using the plan as its guide. Your reference org stays untouched.
Why This Works
This two-agent approach provides clear separation between reading and writing:
- The reference org is never exposed to write operations. Plan Mode ensures the first agent can only read and analyze — it cannot make changes.
- The target org gets a focused build. The second agent works from a well-defined plan, reducing the chance of errors or scope creep.
- No shared agent context between orgs. Each agent operates independently with its own connection, eliminating any possibility of cross-org actions.
Tips for a smooth workflow:
- Review and refine the plan from the first agent before starting the second agent. A thorough plan leads to a cleaner build.
- Keep the reference agent open while building so you can quickly check details or ask follow-up questions about the source org.
- For complex migrations, break the work into smaller plans that each cover a specific area (e.g., object model, automations, permissions) rather than one massive migration plan.