Introduction
The VS Code integrated terminal can open successfully but fail to run commands when the configured shell path is stale, a profile startup script hangs, workspace settings override the user profile, or an extension injects a broken environment. The fix is to isolate VS Code terminal configuration from the shell itself.
Symptoms
- Terminal panel opens with a blank prompt or exits immediately
- PowerShell, bash, or zsh works outside VS Code but not inside it
- A workspace fails while other folders work
- The terminal hangs after loading profile scripts
- Developer tools show terminal process or pty host errors
Common Causes
terminal.integrated.profilespoints to a removed shell executable- PowerShell profile, bashrc, zshrc, or conda activation hangs
- Workspace settings override a working user profile
- An extension modifies environment variables or terminal launch arguments
- Corporate endpoint security blocks shell child processes from Code.exe
Step-by-Step Fix
- 1.Open VS Code with extensions disabled
- 2.Separate core terminal configuration from extension-provided environment changes.
code --disable-extensions .- 1.Inspect terminal profile settings
- 2.Find workspace or user settings that point to a removed shell or invalid arguments.
code --user-data-dir %TEMP%\vscode-clean --extensions-dir %TEMP%\vscode-ext-clean
# Then compare terminal.integrated.defaultProfile and terminal.integrated.profiles in Settings JSON- 1.Bypass shell startup scripts
- 2.If the terminal works with no profile, fix the shell startup script instead of reinstalling VS Code.
powershell.exe -NoProfile
pwsh.exe -NoProfile
bash --noprofile --norc- 1.Reset workspace terminal overrides
- 2.Remove only terminal-specific workspace overrides so project settings stop breaking every contributor.
Get-Content .vscode\settings.json
# Remove stale terminal.integrated.* entries and reopen the workspaceVerification
Verify the exact failure path that triggered the incident instead of relying on a single successful command. Repeat the user-facing action, collect the service or editor log again, and compare the timestamped result with the output captured before the fix. If the affected system has more than one node, profile, workspace, or site binding, test the same path on each one before closing the incident.
- Confirm the original error text no longer appears in the relevant event log, application log, terminal, or status command.
- Confirm the repair survives a restart of the affected service, editor session, worker process, or virtual machine when that restart is safe.
- Watch for secondary failures such as permission errors, stale cache, certificate mismatch, port binding conflicts, or blocked outbound connections.
- Save the final command output and configuration path in the runbook so the next responder can compare against a known-good state.
Prevention
- Avoid committing personal shell paths to workspace settings
- Keep shell startup scripts fast and non-interactive
- Test terminal profiles after VS Code and shell upgrades
- Document team-supported terminal profiles per operating system
Rollback and Escalation
Before applying the fix in production, keep a rollback path ready. Export the current configuration, snapshot the VM or service settings where practical, and write down the exact signal that will trigger rollback. If the change does not improve the original symptom within the expected window, restore the previous configuration and reopen diagnosis from the first failing layer.
Escalate when the failing path crosses an ownership boundary such as Active Directory, DNS, storage, hypervisor networking, corporate proxy, endpoint security, or a managed extension marketplace. Include the failing command, event ID, correlation ID, host name, user profile, and timestamp so the owning team can reproduce the same path without guessing. Keep temporary mitigation separate from permanent cleanup so the service can recover before longer-term refactoring begins.
Operational Notes
Treat this guide as an incident workflow, not a blind checklist. Change one variable at a time, record the before and after state, and avoid combining unrelated registry, policy, package, or configuration changes during the same maintenance window. That discipline makes it possible to prove which change fixed Fix VS Code Integrated Terminal Opens but Commands Do Not Run and prevents a later responder from repeating a risky workaround without context.
When the symptom is intermittent, repeat the diagnostic command from two contexts: the affected user or service account, and an administrator session on the same host. Differences between those two outputs usually reveal policy, profile, permission, proxy, or environment-variable drift. If the failure follows only one user profile or one workspace, repair that scope first instead of changing global server settings. If it follows every profile, continue with machine-wide services, firewall rules, installed updates, and shared configuration.
Related Articles
- [VS Code Auto Save Not Working](fix-vscode-auto-save)
- [VS Code Bracket Colorization Not Working](fix-vscode-bracket-colorization)
- [Fix Fix Vscode Copilot Not Working Issue in VS Code](fix-vscode-copilot-not-working)
- [VS Code Debugger Not Attaching - Complete Troubleshooting Guide](fix-vscode-debugger-not-attaching)
- [Fix VS Code Debugging Not Stopping at Breakpoints: Breakpoints Ignored](fix-vscode-debugging-breakpoints-not-working)
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "TechArticle", "headline": "Fix VS Code Integrated Terminal Opens but Commands Do Not Run", "description": "Troubleshoot VS Code integrated terminal issues by checking shell profile settings, startup scripts, environment variables, and extension conflicts.", "url": "https://www.fixwikihub.com/vscode-errors-fix-terminal-issue", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-01-01T08:59:31.828Z", "dateModified": "2026-01-01T08:59:31.828Z" } </script>