Skip to main content
AI Development

VS Code agent password prompts: when to turn them off

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.

Sean McLellan profile photo

Sean McLellan

Lead Architect & Founder

6 min read
Editorial still life on a warm walnut desk in soft window light: a cream keypad with blank keys on the left is joined by a thin copper tube to a dark brown box with a brass keyhole latch on the right; the tube holds a small brass capsule in a clear section and curves around the front of the wooden base of an empty glass bell jar in the middle, with books, a sage vase and a brass tin in the background
Constructed diagramIllustration: 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 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 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.
Constructed diagramConstructed 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 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 gives it a default of true, an experimental tag and application scope. VS Code's extension documentation on setting scopes 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. 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 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 and admin settings for assisted permissions 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:

{
  "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

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.

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.

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

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.

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.