Skip to content

Fix Platform Agent Cloning — "Workspace not found" error + incomplete data copy #2833

Description

@ryanweiler92

Is there an existing issue for this?

  • I confirm that I have not found an existing or similar issue.

Description

Summary

Cloning an existing platform agent to create a new one is broken. Saving the cloned agent fails with a Workspace not found error, and even where the clone attempt proceeds, the new agent does not inherit the source agent's configuration.

Steps to Reproduce

  1. Navigate to an existing platform agent.
  2. Use the "Clone" (or equivalent "Duplicate"/"Save as new") action to create a new agent from it.
  3. Attempt to save the new agent.

Actual result: Save fails with error Workspace not found.

Expected result: The clone saves successfully as a new agent under the correct workspace.

Bugs to Fix

  1. Save failure — "Workspace not found"

    • Diagnose why the clone operation isn't resolving/assigning a valid workspace context on save. Likely candidates: the clone request isn't passing the current user's workspace ID, is passing the source agent's original workspace ID (which the current user/session doesn't have resolvable access to), or the new agent object isn't being associated with a workspace before the save call fires.
  2. Cloned agent is missing configuration

    • When cloning, the following fields are not being copied over from the source agent and need to be:
      • Selected MCPs (MCP server/tool associations)
      • Selected Skills
      • Instructions (system prompt / agent instructions)
    • Confirm whether other agent-level settings (e.g., model selection, temperature/params, knowledge base or data source links) are also silently dropped during clone and should be included in scope.

Acceptance Criteria

  • Cloning any platform agent completes and saves successfully without a "Workspace not found" error, regardless of which workspace the source agent originated from.
  • The cloned agent is created in the current user's active workspace.
  • On clone, the new agent is pre-populated with the source agent's:
    • MCP selections
    • Skill selections
    • Instructions
  • The cloned agent is a fully independent copy — editing the clone does not affect the original agent, and vice versa.

Relevant Feature or Code

No response

Requirements (what)

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions