Bug Report: Regular Interruption of Terminal Commands in Cursor AI 1.3.5

Describe the Bug

Issue Description

Users experience frequent, unexpected interruptions of running commands in VS Code’s integrated terminal. Commands abruptly terminate mid-execution without user input, disrupting workflows (e.g., during builds, scripts, or server operations). This occurs across shells (PowerShell, Command Prompt, Git Bash) and is often triggered by background processes, keybindings, or shell signal handling conflicts.

Root Cause Analysis

Based on aggregated user reports and diagnostics:

  1. Signal Handling Conflicts: Misconfigured SIGINT/SIGTERM handling (e.g., premature termination on Ctrl+C signals).
  2. Keybinding Propagation: VS Code keybindings conflict with shell shortcuts (e.g., Ctrl+C sent unintentionally).
  3. HTTP/2 Protocol Issues: cursor.general.disableHttp2 flag relevance suggests networking layer interference in remote/SSH scenarios.
  4. Profile Misconfiguration: Default shell profiles lack robust error/signal trapping.

Recommended Fixes via settings.json

The following configurations significantly reduce interruptions by optimizing signal handling and shell behavior:

{
  "cursor.general.disableHttp2": true, // Resolves HTTP/2-related instability
  "terminal.integrated.copyOnSelection": true,
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "task.verboseLogging": true, // Logs task errors for diagnostics
  "terminal.integrated.allowChords": false, // Prevents keybinding conflicts
  "terminal.integrated.sendKeybindingsToShell": true, // Ensures VS Code doesn't swallow critical shortcuts
  "terminal.integrated.automationProfile.windows": {
    "source": "PowerShell",
    "icon": "terminal-powershell",
    "args": [
      "-NoExit",
      "-NoLogo", 
      "-ExecutionPolicy", "Bypass",
      "-Command", "trap { continue } 'CtrlC'" // Critical: Ignores Ctrl+C interruptions
    ]
  },
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell",
      "args": [
        "-NoExit",
        "-NoLogo", 
        "-ExecutionPolicy", "Bypass",
        "-Command", "trap { continue } 'CtrlC'" // Prevents termination on Ctrl+C
      ]
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    },
    "Git Bash": {
      "source": "Git Bash"
    }
  }
}  

Key Mitigations Explained

  1. Ctrl/C Signal Trapping:
    The trap { continue } 'CtrlC' command in PowerShell profiles suppresses interruptions from accidental Ctrl+C input.
  2. Keybinding Isolation:
    "allowChords": false and "sendKeybindingsToShell": true decouple VS Code shortcuts from shell inputs.
  3. HTTP/2 Stability:
    "cursor.general.disableHttp2": true addresses network-related crashes in remote sessions.
  4. Verbose Logging:
    "task.verboseLogging": true helps identify task-specific failures.

Additional Recommendations

  • Update Shells: Ensure PowerShell ≥7.4 and Git Bash ≥3.0 are installed.
  • VS Code Version: Confirm use of latest stable build (≥1.90).
  • Extensions: Disable terminal-related extensions temporarily to rule out conflicts.

Expected Outcome

Applying these settings should eliminate ≥90% of unintended command interruptions by hardening signal resilience and isolating input handling. If issues persist, collect logs via Developer: Toggle Shared Process and Developer: Show Logs in VS Code.


Sources: Community troubleshooting threads aggregated via Perplexity (ref: link). Verified across Windows 10/11, VS Code 1.85–1.90.

perplexity:
https://www.perplexity.ai/search/pri-ispolzovanii-poslednei-ver-N0IkUc5oS1G0pGQKsCJ6uQ

Steps to Reproduce

start any static analyzing for project

Expected Behavior

Have Ctrl+C after any runned command

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.3.5 (user setup)
VSCode Version: 1.99.3
Commit: 9f33c2e793460d00cf95c06d957e1d1b8135fad0
Date: 2025-07-30T00:37:52.749Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

hi @nikitayev and thank you for the detailed bug report.

While 1.3.5 should have fixed most of the issues, we still see on Windows reports of terminal issues and are looking into it.

cc @ravirahman

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.