#15997·LibreChat

[Bug]: Agent duplication drops Code Interpreter files

Author: LaurensNiesten261Created Sep 16, 2026Updated Sep 16, 2026
Labels🐛 bug

What happened?

When an agent has files uploaded through the Agent Builder's Code Files section, duplicating the agent does not preserve those files.

Ordinary text context files are copied correctly, but Code Interpreter files are missing from the duplicated agent.

Expected behavior

The duplicated agent should retain the original agent's Code Interpreter files, subject to the same ownership and permission checks used for other agent files.

Actual behavior

The duplicated agent has no Code Interpreter files attached.

The source agent contains file references similar to:

json
{
  "tool_resources": {
    "execute_code": {
      "file_ids": ["..."]
    }
  }
}

However, the duplicated agent does not contain the execute_code resource.

Additional context

Ordinary text context files are preserved during duplication through tool_resources.context.file_ids.

The duplication handler appears to copy context resources but not execute_code resources. This seems incorrect for files uploaded through the Agent Builder because those files are agent-scoped, rather than temporary conversation uploads.

Could the duplication handler also preserve tool_resources.execute_code.file_ids, subject to the existing ownership and permission checks?

Version Information

LibreChat version: v0.8.8-rc2 Commit: f9f1b2fb951a99e1fd01ee7291304a0370ea6132 Branch: v0.8.8-rc2 Build date: 2026-09-03 02:28:46 UTC User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36 Edg/153.0.0.0

Steps to Reproduce

  1. Create an agent with the Code Interpreter tool enabled.
  2. Open the Agent Builder.
  3. Upload a file through the Code Files section.
  4. Save the agent.
  5. Duplicate the agent.
  6. Open the duplicated agent and inspect its Code Files.

What browsers are you seeing the problem on?

Microsoft Edge

Relevant log output

bash
N/A

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct