# Hosted Copilot agent Hosted channels use the GitHub OAuth token of the first editor who invokes the planner. That login session owns the channel's Copilot usage until it expires, logs out, or an editor chooses **New planner session**. Ownership is assigned atomically in the storage adapter and guarded by a generation token. Reset and logout abort and discard any active hosted SDK session. Permission callbacks also recheck the owner session, ownership generation and repository write access before each custom or MCP tool call. The shared Copilot runtime runs in SDK `mode: "empty"`. Each hosted SDK session receives its owner's token at session creation and has no client-level service token, logged-in-user fallback, checkout, shell, host filesystem, skills, plugins, config discovery, custom repository instructions, shared embeddings or cross-session store. Available capabilities are: - Chopin's plan, question and relationship tools; - bounded file, tree, code-search and commit-history tools fixed to the selected repository; and - read-only GitHub MCP calls whose arguments explicitly match that repository. The repository REST tools construct owner and repository coordinates on the server. They bound response sizes, line ranges and result counts, reject path escape, and post-filter code search by GitHub repository node ID. Copilot CLI session files are disposable. When the process or room restarts, Chopin creates a new SDK session and supplies persisted transcript context; the current plan is read through `read_plan`. No SDK session ID is stored for hosted channels. OAuth App access tokens are supported by the Copilot SDK and charge the owning user's Copilot subscription. Chopin cannot prove entitlement at login: a user without Copilot sees the provider failure on their first planner turn and remains owner until the channel is reset. The runtime is started lazily. `AGENT=off` keeps the hosted planner hidden and does not start Copilot CLI. Legacy `AUTH_DRIVER=off` planning retains its local checkout, global token and startup probe.