Skip to content

[Bug]: Agent-level File Context ignored when agent is spawned as subagent #14663

Description

@tom-sam-778

What happened?

Agent-level "File Context" (files attached in the Agent Builder) is not included when the same agent is spawned as a subagent.

The same agent, with the same files and the same prompt, references its File Context correctly when run as a standalone/primary agent, but NOT when invoked as a subagent via the subagent tool.

The parent agent has no KB or File Context attached; the files are attached only to the child agent. Only the invocation path differs (primary vs subagent spawn).

Version Information

LibreChat version: v0.8.7
Commit: 21dc4a2
Branch: main
Build date: 2026-07-23 15:49:19 UTC
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15

Steps to Reproduce

  1. Create agent B in the Agent Builder and attach files to its "File Context" (files are attached only to B; the parent agent has no KB or File Context).
  2. Create agent A (parent) and make B callable from A's Subagents configuration.
  3. Run B standalone as a primary agent, and ask a question whose answer exists only in the attached File Context files.
    → Result: B references the File Context correctly (works).
  4. Start agent A and delegate the same task (same question) to B via the subagent tool.
    → Result: B does NOT reference its File Context; the answer is missing (fails).
  5. The failure persists regardless of prompt wording. Same agent, same files, same prompt — only the invocation path (primary vs subagent) differs.

What browsers are you seeing the problem on?

Safari

Relevant log output

No relevant logs were produced. The issue reproduces silently: the subagent simply does not receive the File Context content, with no error or warning in debug/error logs.

Screenshots

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions