Skip to content

bug: File syntax for prompt field broken for sub agents #3581

@hammingb

Description

@hammingb

Checks

Operating system

mac

Expected behaviour

I want to define an agent which can be used both as an agent and a sub agent and uses the file syntax feature for its prompt

Actual behaviour

This isn't possible because the file is looked up from a different relative path based on whether it is launched as an agent or a sub agent. This means only full paths can work. Full paths make the agent definition far less portable.

Steps to reproduce

Make an agent like the one given as an example in the documentation

try to launch it as a sub agent and it will fail to load context from its prompt file

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions