AI coding tools · Copilot ·
Copilot run_in_terminal missing? Use Local or your shell
Your custom agent used to run commands in VS Code's integrated terminal with run_in_terminal. Now a new chat can't find that tool, falls back to a fresh shell, and the commands fail or the agent says the terminal "isn't available". As of October 2026, VS Code's docs say "Copilot harness sessions use the built-in shell tool by default", and that the integrated-terminal controls apply to Local harness sessions. New chats are now starting on the Copilot harness, so workflows built around the integrated terminal can break. This guide covers what the docs say you can do.
If you want the next step, read GitHub Copilot hooks not working? Port them to the harness.
Quick fix
- Start the chat on Local. In the editor's Chat view, start a new session and pick Local under Session Target.
- Keep Local available on an unmanaged editor with the three experimental settings below.
- Or stay on the Copilot harness and turn on
chat.agentHost.shellTool.initScript.enabledso each command loads your shell profile.
What the user report shows
As of October 2026, in microsoft/vscode#343575 (opened 22 Oct 2026, still open), one user reports that on VS Code 1.143.0 with Copilot Chat 0.71.0, new chats default to the Copilot harness and run_in_terminal "is not exposed". The reporter says the agent's tool search returns runTask, createAndRunTask and getTaskOutput instead, falls back to its own bash tool in "a fresh shell without the prepared terminal state", and then tells the user the terminal "isn't available". The reporter also says a Local chat in the same window kept working. One other user commented that this was "quite frustrating to debug". This is a user report, not a confirmed VS Code bug, and the VS Code team hasn't replied in the thread as of 24 Oct 2026.
Step 1: start the chat on Local
VS Code's agent harnesses page says Local "remains an editor harness option while you adapt integrations that depend on it". Start a new session in the editor's Chat view and select Local from Session Target. The page notes that Local is not available in the Agents window.
Step 2: keep Local available
For an unmanaged editor, the same page gives these experimental settings, which "make Local visible and turn off automatic Copilot preference":
{
"chat.editor.localAgent.enabled": true,
"chat.defaultToCopilotHarness": false,
"chat.editor.preferCopilotHarness": false
}
An organization policy can override user settings. From version 1.142, the docs say administrators can set vscode.temporaryDefaultToLocalHarness to true in enterprise-managed settings. The docs also warn that "Local does not enforce runtime-only sandbox and permission rules", so check that trade-off before you rely on Local.
Step 3: or load your shell in the Copilot harness
If you'd rather stay on the Copilot harness, VS Code's tools docs say that turning on chat.agentHost.shellTool.initScript.enabled loads ~/.bashrc on macOS and Linux, or your PowerShell profiles on Windows, before each command. This applies to Copilot harness sessions on your machine that use the built-in shell tool, not to remote sessions. A profile that runs again before each command isn't the same as a long-lived terminal, so services you signed in to by hand in one terminal may still need their own setup.
The same docs say all client-side tools are available to the Copilot harness by default, and you can check which are turned on in the Tools tab. If your agent depends on a tool you can't find there, the harnesses page asks you to tell the VS Code team in a GitHub issue.
If your skills or hooks stopped working too, see Copilot skills not working in VS Code and GitHub Copilot hooks not working.
Keep Local while you migrate, with the kit
Disclosure: this is our own paid product. The Copilot Harness Port Kit is designed to help you keep chat on Local, move personal skills to folders the Copilot harness reads, and port your hooks. Its keep-Local script adds the three user settings the VS Code docs give to keep Local visible and turn off automatic Copilot preference, with a dry run and undo. It doesn't add run_in_terminal to the Copilot harness. Its 62 automated tests ran against local fixtures and temporary folders, not a live Copilot session or VS Code install, and we haven't tested whether the keep-Local settings survive a VS Code update. It needs Node.js 20 or later. It costs $12 (plus VAT where applicable).
Sources
As of October 2026 (sources checked 24 Oct 2026):
- GitHub issue #343575, Copilot harness lacks run_in_terminal: https://github.com/microsoft/vscode/issues/343575
- VS Code docs, agent harnesses (keep Local available): https://code.visualstudio.com/docs/agents/run/agent-harnesses
- VS Code docs, agent tools (terminal and shell initialization): https://code.visualstudio.com/docs/agents/run/tools
- VS Code docs, migrate customizations to the Copilot harness: https://code.visualstudio.com/docs/agent-customization/migrate-customizations
GitHub, GitHub Copilot, Visual Studio Code (VS Code), Microsoft and other names belong to their owners. Names are used only to identify products and compatibility. Stack & Ship is not affiliated with or endorsed by any of them.