Skip to content

Headless resume (--resume with -p) ignores --plugin-dir, so --agent <plugin>:<agent> fails with "No such agent" (regression in 1.0.115) #5646

Backlog

Description

@AlBurns-MSFT

Describe the bug

Since 1.0.115, resuming a session in prompt mode (--resume=<id> -p "...") does not load the plugins passed with --plugin-dir. A plugin-qualified agent passed with --agent then cannot be found, and the run exits with No such agent: <plugin>:<agent>. The same flags work when starting a new session, and the same resume worked in 1.0.114. An interactive resume (no -p) with the same flags selects the agent normally.

The debug log of the failing resume shows Plugins loaded: [] and custom-agent requested discovery inputs {... "explicit_directory_count":0 ...}, then session.agent.selectInitial fails with Custom agent 'stable-p1:resume-probe' not found. In 1.0.114 the same resume logs Plugins loaded: ["stable-p1"].

Affected version

1.0.115 through 1.0.119 (macOS arm64; the same failure on Windows with 1.0.118). Works in 1.0.114.

Steps to reproduce the behavior

  1. Create a plugin that provides one agent:
mkdir -p stable-p1/.github/plugin stable-p1/agents
printf '{"name":"stable-p1"}' > stable-p1/.github/plugin/plugin.json
printf -- '---\nname: resume-probe\ndescription: Probe agent for a resume test\n---\nReply exactly as asked.\n' > stable-p1/agents/resume-probe.md
  1. Start a session with that agent:
copilot --plugin-dir ./stable-p1 --agent stable-p1:resume-probe -p "Reply with the single word ok"

It replies ok and prints copilot --resume=<id>.

  1. Resume it with the same flags:
copilot --resume=<id> --plugin-dir ./stable-p1 --agent stable-p1:resume-probe -p "Reply with the single word again"

It fails with No such agent: stable-p1:resume-probe (exit code 1). With --prefer-version 1.0.114, step 3 replies again.

Expected behavior

--plugin-dir applies to a resumed session in prompt mode, as it does to a new session and to an interactive resume, so --agent <plugin>:<agent> resolves and the resumed prompt runs.

Additional context

  • Tools that materialize an agent as a plugin and pass --plugin-dir plus --agent on every run cannot resume a session headlessly on 1.0.115 and later.
  • Related but different: Resuming a session does not restore the custom agent (regression of #917) #4674 (resuming did not restore the session's custom agent, fixed in 1.0.112). Here the agent is passed explicitly, but the plugin that provides it is not loaded on resume.
  • Workarounds: resume interactively, or use an agent from the agents folder (not plugin-qualified), which still resolves on a headless resume.

Activity

  1. added
    area:non-interactive
    area:plugins
    area:sessions
    and removed on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:non-interactivearea:pluginsarea:sessions

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions