Skip to content

@filepath syntax for --agents not supported by CLI #500

@karlolukic

Description

@karlolukic

Description

When the total command line exceeds 100KB, the SDK writes the agents JSON to a temp file and passes --agents @/path/to/temp.json. However, the CLI doesn't parse this syntax - it treats the literal string @/path/... as the JSON value, which fails to parse.

Reproduction Steps

  1. Create agent definitions totaling >60KB
  2. Add a system prompt >40KB
  3. Total command exceeds 100KB limit
  4. SDK writes to temp file (visible in logs: "Using temp file for --agents")
  5. CLI fails to load custom agents

Expected Behavior

CLI should read JSON from the file path when --agents value starts with @

Actual Behavior

CLI sees literal @/path/... string, can't parse as JSON, loads zero custom agents.

Error observed by orchestrator:

Agent type 'file-processor' not found. Available agents: general-purpose, statusline-setup, Explore, Plan

Versions

  • SDK: 0.1.8
  • CLI: 2.1.12

Workaround

Keep total command under 100KB by reducing prompt sizes.

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