You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Headless resume (--resume with -p) ignores --plugin-dir, so --agent <plugin>:<agent> fails with "No such agent" (regression in 1.0.115) #5646
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
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
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>.
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.
Activity