Skip to content

Copilot harness (now default) silently lacks run_in_terminal; agents fall back to a separate shell and fail where Local works #343575

Open

Description

@SnoElement

Version: VS Code 1.143.0 (macOS), Copilot Chat 0.71.0, Copilot harness runtime 1.0.100-1

What changed: New chats now default to the Copilot harness. In the same window, a Local-harness chat and a Copilot-harness chat get different capabilities, and nothing at session start shows which harness a chat is in or what it is missing.

Steps to reproduce

  1. Use a workspace whose custom agents (.github/agents/*.agent.md) run tooling in the integrated terminal through run_in_terminal. The tooling depends on shell state: modules that are already loaded and services that are already authenticated.
  2. Open a new chat. It starts in the Copilot harness by default. Ask the agent to run one of those commands.

Expected: The same tool surface as a Local chat, or a clear warning at session start that the integrated terminal tool is not available in this harness.

Actual

  • run_in_terminal is not exposed. The agent's tool search returns runTask, createAndRunTask, and getTaskOutput, never run_in_terminal. The agent falls back to its own bash tool, a fresh shell without the prepared terminal state, so the commands fail or never run. It then tells the user the terminal "isn't available", which looks like an environment problem rather than a harness limitation.
  • Agent Customizations > Migrations lists my 11 user mcp.json servers as pending migration to ~/.copilot/mcp-config.json, yet the servers did load in this chat, because VS Code syncs them into an agentPlugins copy. A "pending" state for servers that already work is confusing. (Edited: an earlier version of this issue said these servers were not loaded. That was wrong.)
  • The agent picker in the Copilot harness does not list all of the workspace custom agents that the Local picker shows.
  • When I opened a new Local chat, VS Code asked why I wanted to switch to Local.

Why it matters: The default switched without a clear signal, so existing agent workflows that depend on the integrated terminal broke and looked like agent mistakes. A Local chat in the same window kept working.

Related: #341771 (non-TTY terminals, chats snapping back to Copilot), #342924 (MCP servers and instructions missing in the Copilot harness), #341962 / #340041 (tool picker).

Request: Expose run_in_terminal (an integrated-terminal tool that keeps shell state) in the Copilot harness, or make its absence visible. Clarify what "pending migration" means when the servers already load. Document how a user can keep Local as their default.

Activity

  1. MathanGeurtsen commented on Oct 22, 2026

    @MathanGeurtsen

    It then tells the user the terminal "isn't available", which looks like an environment problem rather than a harness limitation.

    This has been quite frustrating to debug let me tell you!

  2. changed the title [-]Copilot harness (now default) silently lacks run_in_terminal and user MCP servers; agents fall back to a separate shell and fail where Local works[/-] [+]Copilot harness (now default) silently lacks run_in_terminal; agents fall back to a separate shell and fail where Local works[/+] on Oct 23, 2026
  3. petersonjdNIH commented on Oct 31, 2026

    @petersonjdNIH

    This has been the most frustrating new behavior ever. It results in unsigned commits and the entire session not being able to interact with the GitHub Codespace or the VS Code window. Users should be able to set up their default behavior and have it stick, but this one is entirely impossible right now.

    From my research, this is what I've been able to dig up:


    There is no documented setting that restricts Copilot Chat to Local only, and nobody has reported a complete fix. I found three partial controls and a few related open issues. I searched microsoft/vscode and github/copilot-cli, and I couldn't search GitHub-wide because gh isn't authenticated in this session.

    The gap: microsoft/vscode#342291 (open)

    The reporter confirms you can hide Cloud, Claude and Codex with these settings:
    github.copilot.chat.cloudAgent.enabled: false
    chat.agentHost.claudeAgent.enabled: false
    chat.agentHost.codexAgent.enabled: false
    No setting hides the built-in Copilot session type (agent-host-copilotcli). That is the one that can't sign commits for you. github.copilot.chat.backgroundAgent.enabled: false only affects the session list, not the picker.
    The reporter's analysis says Local is hardcoded and the Copilot entry is registered with no gating condition.
    The only workaround they found is injecting CSS into VS Code's shipped workbench.html, which is unsupported and breaks on every update.

    Other issues that match your situation:

    microsoft/vscode#343575 (open): New chats now default to the Copilot harness. Its agents fall back to a separate shell and fail where Local works. The reporter asks for documentation on keeping Local as the default, and there is no maintainer reply yet.
    microsoft/vscode#341462 (open, assigned): Copilot CLI sessions can't use the visible VS Code terminals. This is the isolation you described.
    microsoft/vscode#316791 (open): git commit hangs in the Agents App bash tool when SSH signing is on. The cause is that GIT_ASKPASS and the related variables aren't set. This is related to your Secretive setup, but it was reported for the Agents App, not Codespaces.
    microsoft/vscode#334495 (open): The Agents Window should respect git.enableCommitSigning.
    microsoft/vscode#334499 (open): This shows Copilot CLI can be disabled by an organization policy. VS Code still starts the CLI component and shows a sign-in popup, so the policy doesn't fully remove it.

    I found no report specifically about Codespaces signing failing in Copilot CLI sessions, and no github/copilot-cli issue on it.

    What you can do today:

    Org policy: An org owner can disable Copilot CLI under the organization's Copilot settings. Based on #334499, it blocks the sessions from working, but I haven't confirmed it removes the picker entry.
    Settings: Put the three settings above in your Codespaces default settings or dotfiles. That narrows the picker to Local plus Copilot.
    Instructions: Add a rule to AGENTS.md so agents never run git commit or git push. It's soft enforcement but works in every session type.

  4. IliasAarab commented on Nov 11, 2026

    @IliasAarab

    I'm experiencing the same issue on Windows. My default VS Code integrated terminal is Git Bash, but the new Copilot harness uses PowerShell instead, ignoring my configured terminal profile.

    This is quite disruptive for workflows that rely on Bash commands, scripts, and environment configuration. Ideally, the new harness should respect terminal.integrated.defaultProfile.windows, or at least provide an option to configure the shell independently.

    Is support for this planned?

  5. martinkna commented on Nov 15, 2026

    @martinkna

    Hi, I would also like to continue to use run_in_terminal and send_to_terminal - either copilot harness should enable this or do you have any other ideas on how to continue to interact smoothly with the terminal inputs and outputs using github copilot once the local harness is sunset in February 2027? The big benefit currently is that you see what copilot is sending to the terminal in the terminal and you can also switch between github copilot inputting commands and manually inputting commands in the terminal and both share the same context and visual interface, i would like really to continue to work like that.

  6. SEc-123 commented on Nov 18, 2026

    @SEc-123

    I’m experiencing the same issue. In previous versions, Local mode could handle the tasks I needed, but in Copilot mode it can’t do them at all. This is causing significant disruption to my work. If this continues, I may have to stop using Copilot in VS Code because it can no longer help me with the problems I need to solve.

  7. pavel-slama commented on Nov 19, 2026

    @pavel-slama

    I got related problem. I need specific commands to run outside sandbox (allow sandbox bypass + autoapprove specific commands).

    Unlike run_in_terminal, shell tool (bash in my case) lacks the ability to escalate command run outside sandbox no matter the config.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions