Repository navigation
Description
Describe the bug
A session created with the session management tool create_session starts with no extension processes. Its model has none of the extensions' tools, none of the skills extensions register, and no extension hooks. Extensions start only when the user first switches to that session in the Sessions sidebar or with /resume, or when /restart restores it. Sessions the user starts directly, and prompt mode (copilot -p), load extensions within a second or two.
A created session is meant to work without the user watching, so it can spend minutes on its task without the tools it was asked to use.
Affected version
GitHub Copilot CLI 1.0.108-1 (also seen in 1.0.105, 1.0.106, and 1.0.107)
Steps to reproduce the behavior
- Turn on session management tools (
sessionManagementToolsin~/.copilot/settings.json). - Add a user extension, for example
~/.copilot/extensions/probe/extension.mjs, that callsjoinSession({ tools: [{ name: "probe_ping", ... }] }). - In session A, ask the agent to call
create_sessionwith the prompt "Search your tools for probe_ping and say whether it exists." Stay in session A. - Session B reports that
probe_pingdoesn't exist. The process log has no extension launch for B's session ID, and B'sevents.jsonlhas no extension events. - Switch to B in the sidebar. The log shows
Registering foreground session: <B>, thenSession changed (<A> → <B>), reloading extensions, followed by extension bootstrap lines for B. Send B any message;probe_pingis now available.
Expected behavior
A session created with create_session gets the same extensions as any interactive session from the moment it's created, since the host supervises it and it is meant to work without the user watching.
Additional context
- macOS on Apple silicon (arm64).
- Over two days on one machine, 10 sessions created by other sessions received their extensions between 36 seconds and 26 minutes after creation, each time when the user first opened the session.
copilot-sdk/docs/extensions.mdsaysjoinSession()"attaches to the user's current foreground session", which may explain it.- Possibly related: Switching sessions in the Sessions sidebar leaks plugin MCP servers and extension hosts (OOM) #5164 (switching sessions in the sidebar starts a set of extension hosts per session).
Activity
nima-ap commentedon Nov 8, 2026
Switching to a created session while it is still working leaves its extension tools broken, even though the switch starts its extensions. We narrowed it down on 1.0.108-1 with test sessions and a test extension.
Steps, using the
probeextension from this issue:create_sessionto make session B with a prompt that keeps it busy, such as "Runsleep 120, then reply ready."reloading extensionsandInstalled N native extension(s)for B.extensions_manageandextensions_reload. B's extension processes keep running.probe_ping. B doesn't find it, even if you switch to B while it runs.probe_ping, and so does every later turn, including turns that A starts while B is in the background.Variations:
session.sendonce B is idle also has the tools and fixes later turns, the same as typing.Flows where one session starts another on a task hit this often, because the new session starts working at once and the user switches to it to watch.