# VS Code agent password prompts: when to turn them off

- Canonical: https://www.baristalabs.io/blog/vscode-agent-shell-password-prompts
- Published: 2026-11-27
- Author: Sean McLellan
- Excerpt: VS Code 1.148 turns on experimental in-chat password prompts for Copilot agent commands by default. Answers skip the model, and 1.148 has no admin policy, so each user's setting decides.

AI Development

Sean McLellan

Lead Architect & Founder

November 27, 2026 6 min read

Constructed diagram Illustration: a sealed capsule travels straight from the keypad to the lockbox and bypasses the empty jar. Not product UI.

VS Code 1.148, released November 25, 2026, lets Copilot agent sessions in the Agent Host ask you in chat for the passwords, passphrases and confirmations that `sudo -A`, `ssh` and `git` request. The setting, `chat.agentHost.copilot.shellAuthentication.enabled`, is on by default, and VS Code says the answer goes only to the program that asked and isn't sent to the model. The decision for engineering leads is whether to leave it on for your team or switch it off in each developer's user settings.

The catch is in how the setting is controlled. In 1.148, it is marked experimental, scoped to user settings only, and registered without an enterprise policy, so a repository's `.vscode/settings.json` can't turn it off and an admin can't lock it centrally.

## What changed in VS Code 1.148 for agent shell commands?

Agent commands that stop for a password now pause and ask you instead of failing. The [VS Code 1.148 release notes](https://code.visualstudio.com/updates/v1_148) say that before this release, "in Copilot harness sessions, commands that needed a password, such as sudo, ssh, or git, failed because the agent runs commands without an interactive terminal by default."

Now, when one of those programs asks for input, "the prompt now appears as a question in chat. Your answer goes only to that program and isn't sent to the model." The same section says prompts that nobody can answer, such as in Autopilot, are canceled.

The feature covers three programs and three kinds of input. The Agent Host source defines a masked field for a password or passphrase, a visible text answer, and a Yes or No choice. Each prompt is titled with the program, for example "ssh needs a password," and shows the command that triggered it under a "Command:" label.

## How the answer stays out of the model

VS Code answers the prompt through its own channel, not through the chat conversation. The [Agent Host developer notes in the 1.148 source](https://github.com/microsoft/vscode/blob/release/1.148/src/vs/platform/agentHost/AGENTS.md) describe the path: VS Code "shows its own question for it, masked for secrets, and sends the answer through the RPC, so the answer never enters chat state; the AHP JSONL log redacts it."

![Constructed flowchart: an agent runs git, ssh or sudo -A; the program asks for a password, passphrase or yes/no; VS Code shows its own prompt with the program and command, masked for secrets; the answer goes only to that program and is not sent to the model, kept out of chat state and redacted in the Agent Host log. The prompt is canceled instead in Autopilot, with auto-reply, with no active turn, or when the turn ended; over a Web PubSub or Mission Control relay connection, VS Code offers only to cancel it.](https://www.baristalabs.io/blog/inline/vscode-agent-shell-password-prompts.jpg)

Constructed diagram Constructed from the VS Code 1.148 release notes and Agent Host source. Not product UI.

The protection has a clear edge. VS Code's [Copilot security guidance](https://code.visualstudio.com/docs/copilot/security) says this protection "applies only to the dedicated authentication prompt." A password typed into the ordinary chat box, or pasted into a command, gets no such handling. The same page tells users to "review the requesting command and destination" before answering.

## When the prompt is canceled instead

Some sessions can't show the prompt, so VS Code cancels it and the command fails as it did before. According to the Agent Host notes, Copilot cancels the prompt:

- in Autopilot or with auto-reply,
- when there is no active turn or the turn has ended,
- when the session no longer needs the answer.

Remote sessions add one more case. The notes say Web PubSub and Mission Control relays "carry only sealed credentials, so over them VS Code offers only to cancel the prompt, and the relay transport refuses to send an answer." If your agents run on remote hosts through a relay, expect password-protected commands to keep failing there.

Unattended work should not depend on this feature at all. An Autopilot run that needs `sudo` or an SSH passphrase will still stop.

## Who controls the setting?

In 1.148, each developer controls it in their own user settings. The [1.148 setting registration](https://github.com/microsoft/vscode/blob/release/1.148/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts) gives it a default of `true`, an experimental tag and application scope. VS Code's [extension documentation on setting scopes](https://code.visualstudio.com/api/references/contribution-points) defines application scope as settings that "can only be configured in user settings."

The same registration has no policy entry, and the setting doesn't appear on VS Code's [enterprise policies page](https://code.visualstudio.com/docs/enterprise/policies). Other chat settings in the same file do carry policy entries, so VS Code policy can reach chat settings. This one has no entry in 1.148.

The registration also says the setting "takes effect when a session starts or resumes." Turning it off mid-session doesn't change the running session.

All of this applies to Agent Host sessions. The release notes say VS Code has "transitioned our harness to the Agent Host," and they repeat that the Local harness "is deprecated and will be removed in February 2027." The BaristaLabs post on [moving off the VS Code Local harness](https://www.baristalabs.io/blog/vscode-local-harness-retirement-copilot) covers what needs to move before then.

## Why it matters for teams running coding agents

BaristaLabs' interpretation: before 1.148, a command that needed a password simply failed. That left developers to run the step by hand or to hand the agent the secret some other way, such as typing it into chat or into the command, which VS Code's security guidance warns against. The new prompt is the safer of those paths, because the answer skips the model and the chat history. Turning it off doesn't remove the need for credentials. It sends people back to the other options.

The new risk is approval fatigue. A prompt that says "sudo needs a password" is easy to answer without reading the command under it. Reading that command before answering is the actual control.

Sandboxing still matters alongside this. If an agent can run `sudo` at all, the [Copilot local sandbox](https://www.baristalabs.io/blog/github-copilot-local-sandbox-ga-policy-tests) and [admin settings for assisted permissions](https://www.baristalabs.io/blog/copilot-assisted-permissions-admin-settings) decide what it can reach before any password prompt appears.

## Should you leave VS Code shell password prompts on?

BaristaLabs recommends leaving the setting on for developers who sit with their agent sessions, with one rule: read the program and command in every prompt before answering, and decline anything you didn't expect.

Turn it off if:

- your agents shouldn't run `sudo` or reach SSH hosts with a developer's credentials at all,
- the machine is shared, or several people drive sessions on it,
- your team policy is that no human credential is entered into an agent workflow, even through a masked prompt.

To turn it off, add this to each developer's user `settings.json`, then start or resume the session:

```json
{
  "chat.agentHost.copilot.shellAuthentication.enabled": false
}
```

Because 1.148 has no enterprise policy for this setting and scopes it to user settings, put the line in your onboarding or dotfiles and check it during setup reviews. Where you can, give agents non-interactive access instead: an SSH agent with a scoped key, or a Git credential helper, so the prompt rarely appears in the first place.

## Sources and scope

- [VS Code 1.148 release notes](https://code.visualstudio.com/updates/v1_148), November 25, 2026
- [Setting registration in the VS Code 1.148 source](https://github.com/microsoft/vscode/blob/release/1.148/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts), read November 27, 2026
- [Agent Host developer notes in the VS Code 1.148 source](https://github.com/microsoft/vscode/blob/release/1.148/src/vs/platform/agentHost/AGENTS.md), read November 27, 2026
- [VS Code docs: Copilot security](https://code.visualstudio.com/docs/copilot/security), read November 27, 2026
- [VS Code docs: setting scopes in contribution points](https://code.visualstudio.com/api/references/contribution-points), read November 27, 2026
- [VS Code docs: enterprise policies](https://code.visualstudio.com/docs/enterprise/policies), read November 27, 2026

The feature is experimental, so its default and behavior can change in later releases. The sources describe how the answer is routed; they don't include an independent security review, and BaristaLabs did not test the prompt for this post. For help setting agent guardrails across a team, see [AI consulting](https://www.baristalabs.io/services/ai-consulting).

VS Code agent credentials

Set one credential rule for your coding agents

Bring a list of what your agents run that needs sudo, SSH or Git credentials. BaristaLabs can help decide where in-chat password prompts stay on, where they go off, and which non-interactive access replaces them.

[Plan my agent credential rules](https://www.baristalabs.io/contact?service=ai-consulting&placement=end&source=blog&slug=vscode-agent-shell-password-prompts) [Explore AI consulting](https://www.baristalabs.io/services/ai-consulting)

A list of the commands your agents run is enough to start.

Turn this idea into a pilot

## Which workflow should go first?

Use the readiness check to compare impact, effort, risk, owner, and next step before requesting a review.

- 3-5 minutes
- Deterministic score
- No sensitive data

[Check workflow readiness](https://www.baristalabs.io/assessment)

Practical AI Workflow Notes

## Enjoyed this? Get our plain-English workflow notes.

We send occasional short notes on putting AI to work in everyday operations, from taming messy documents and customer follow-ups to simple reporting and safety guardrails.

Email address

Send me the notes

A relaxed way to stay in touch if you're still exploring and aren't ready to chat yet.

Occasional emails with practical ideas only. Unsubscribe anytime.

Article-specific next step

Plan my agent credential rules

[Plan my agent credential rules](https://www.baristalabs.io/contact?service=ai-consulting&placement=sidebar&source=blog&slug=vscode-agent-shell-password-prompts)

![Sean McLellan profile photo](https://www.baristalabs.io/profile-sean-mclellan.jpg)

## Sean McLellan

Lead Architect & Founder

Sean McLellan is the founder and lead architect at BaristaLabs. He brings more than two decades of software architecture experience to BaristaLabs products and client work for small teams. Client work starts with an assessment of one workflow. Fixed-scope discovery then defines a bounded pilot, explicit human-review boundaries, and the source-traceable proof needed for the next decision.

[More articles by Sean McLellan](https://www.baristalabs.io/authors/sean-mclellan)

[Twitter](https://twitter.com/seanmclellan) [GitHub](https://github.com/seanmclellan)
