AI initiated terminal commands fail on Remote SSH with Argument list too long and dump_bash_state not found

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When Cursor AI executes shell commands inside the integrated terminal, simple git operations fail or print extra errors. The same commands work when run manually in the same terminal or in an external terminal. This blocks using AI to automate routine repo tasks.

Steps to Reproduce

Open any repository in Cursor.

In Cursor AI chat, ask it to run a git command (for example, git branch).

Optionally, ask it to run git status.

Expected Behavior

When Cursor AI runs terminal commands, they should behave identically to manual execution in the integrated terminal. No wrapper-related errors. No missing helper errors.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.6.21
VSCode Version: 1.99.3
Commit: 991f43b9a4230ca6657f343c9a8e23e6b506ee90
Date: 2025-09-15T00:15:53.430Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

For AI issues: add Request ID with privacy disabled

80fc7ba1-047a-468b-8d02-169fc5330ce1

Additional Information

For the git branch request:
–: line 5: /usr/bin/base64: Argument list too long
–: line 1: /usr/bin/git: Argument list too long
–: line 1: dump_bash_state: command not found

For the git status request:
On branch
Your branch is up to date with ‘origin/’.

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: <some-file.sh>

Untracked files:
(use “git add …” to include in what will be committed)
<file1.sh>
<file2.sh>
<file3.sh>

no changes added to commit (use “git add” and/or “git commit -a”)
–: line 1: dump_bash_state: command not found

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

EDIT:
This issue seems to happen mainly when working over Remote SSH connections. Running the same commands with AI on a local workspace does not always reproduce the error.

1 Like

Hey, thanks for the report. We’ll look into it.

1 Like

I did some additional investigation. It looks like this problem happens only with Remote SSH connections. When AI first instantiates a terminal on the remote machine, the shell starts in the remote user’s default location instead of the project workspace. AI then has to figure out the actual working directory using pwd before running the intended command. Also, the error

--: line 1: dump_bash_state: command not found

is consistent after every command execution on a Remote SSH connection, even when the underlying git command succeeds.

1 Like

Any news? @deanrie @condor

1 Like

Hi @Kazopl, could you upgrade to the latest version of Cursor? This should be fixed in 1.6.42.

1 Like

Confirmed fixed in 1.6.42. Thanks!

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