# Having issues with PowerShell. MacBook Apple Silicon

**URL:** <https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321>\
**Category:** Help\
**Created:** [January 27, 2025, 3:48pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321 "2025-01-27T15:48:40Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [January 27, 2025, 3:48pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/1 "2025-01-27T15:48:40Z")

</div>

On my Mackbook Pro Max 16 2023  
I am getting errors from Composer. this happens when it wants to execute a command on the CLI.

I am not sure why this is happening. I did install xcode and wondering if this caused something to break. Please let me know.

### Exception

System.InvalidOperationException: Cannot locate the offset in the rendered text that was pointed by the origi  
nal cursor. Initial Coord: (42, 18) Buffer: (109, 19) Cursor: (43, 0)  
at Microsoft.PowerShell.PSConsoleReadLine.RecomputeInitialCoords(Boolean isTextBufferUnchanged)  
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)  
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()  
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.InputLoop() at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, C ancellationToken cancellationToken, Nullable`1 lastRunStatus)

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [January 28, 2025, 2:39pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/2 "2025-01-28T14:39:47Z")

</div>

Hey, can you send a screenshot of how this error presents to you?

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [January 29, 2025, 2:19pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/3 "2025-01-29T14:19:51Z")

</div>

![Screenshot 2025-01-29 at 8.17.40 AM](https://us1.discourse-cdn.com/cursor1/original/3X/e/9/e9076d0984ce4380de49ecce56aff2ecf328b771.png)

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [January 29, 2025, 2:20pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/4 "2025-01-29T14:20:25Z")

</div>

I am not sure why it is trying to use powershell.

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [January 29, 2025, 2:39pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/5 "2025-01-29T14:39:52Z")

</div>

Environment:

- OS: macOS (darwin 24.2.0)
- System Shell: zsh (/usr/local/bin/zsh)
- Component: AI Assistant’s run\_terminal\_cmd tool
- IDE: Cursor

Version: 0.45.4  
VSCode Version: 1.96.2  
Commit: d9f8a232158c173cb84b31a70a49a9689bf0f770  
Date: 2025-01-26T07:23:35.719Z (3 days ago)  
Electron: 32.2.6  
Chromium: 128.0.6613.186  
Node.js: 20.18.1  
V8: 12.8.374.38-electron.0  
OS: Darwin arm64 24.2.0

Shell zsh

Issue: Cursor IDE’s run\_terminal\_cmd Tool Defaults to PowerShell on macOS Despite System Shell Being zsh

When the AI Assistant (Claude) attempts to execute commands using the run\_terminal\_cmd tool, it incorrectly defaults to PowerShell despite the system being configured to use zsh. This creates issues when running shell-dependent commands and scripts.

Steps to Reproduce:

- Open Cursor IDE on macOS
- Verify system shell is zsh (echo $SHELL returns /usr/local/bin/zsh)
- Ask the AI Assistant to execute a command using run\_terminal\_cmd
- Observe the command execution output

Expected Behavior:

The run\_terminal\_cmd tool should respect the system’s default shell (zsh) when executing commands on macOS.

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [January 29, 2025, 2:44pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/6 "2025-01-29T14:44:16Z")

</div>

**Technical Details** :

1. The tool appears to be hardcoded to use PowerShell’s PSReadLine (version 2.3.4) and PowerShell Core (version 7.4.0)

2. This occurs even when the system’s default shell is explicitly set to zsh

3. Attempts to force zsh using `/bin/zsh -c` still show PowerShell initialization, suggesting the tool is wrapping all commands in a PowerShell context

4. The issue persists despite proper zsh configuration in the user’s environment:

- Properly configured `.zshrc` with conda initialization

- Valid shell environment variables

- Correct PATH configurations

**Impact on Conda Usage** :

The PowerShell wrapping is particularly problematic for conda environments because:

1. Conda’s shell initialization is specifically configured for zsh in the user’s `.zshrc`

2. The PowerShell wrapper prevents proper conda environment activation

3. Environment variables and PATH modifications made by conda aren’t properly propagated

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [February 1, 2025, 4:55pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/7 "2025-02-01T16:55:57Z")

</div>

You should be able to add to your AI rules which terminal you want it to use and see if that helps.

If not let me know, we may need to add an option to choose the default terminal for the Composer agent!

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [February 1, 2025, 7:03pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/8 "2025-02-01T19:03:09Z")

</div>

Where do I add the rule for this and what should I say in that rule?

---

<div class="post-metadata">

**Author:** ![jonathanbossenger](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jonathanbossenger/32/24482_2.png) [@jonathanbossenger](https://forum.cursor.com/u/jonathanbossenger)\
**Post date:** [February 2, 2025, 5:24pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/9 "2025-02-02T17:24:29Z")

</div>

I’m having similar issues. I thought it was because I had PowerShell installed on my MBP, so I removed it and the VSCode Poweshell extension, but it didn’t solve the issue.

Adding the following to the Rules for AI field in the Cursor Settings seems to help; it now always opens a new terminal pane and runs the commands there.

> Always use the default OS terminal over Powershell for running commands, except if it’s on a Windows machine

But it would be nice if it did that in the Cursor agent instead of the new terminal pane.

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [February 5, 2025, 7:23am UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/10 "2025-02-05T07:23:08Z")

</div>

Can you give this a try:

> [@Cursor Agent is not using the default shell](https://forum.cursor.com/t/cursor-agent-is-not-using-the-default-shell/43361/10):
>
> I am using MacOS and had same issue where composer was using powershell and not bash. Following settings in the settings.json worked for me - "terminal.integrated.automationProfile.osx": {}, "terminal.integrated.defaultProfile.osx": "bash", "terminal.integrated.shellIntegration.enabled": false, "terminal.integrated.defaultProfile.linux": "bash" Importantly, it did not work until I set the Linux profile as well to ‘bash’

---

<div class="post-metadata">

**Author:** ![jonathanbossenger](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jonathanbossenger/32/24482_2.png) [@jonathanbossenger](https://forum.cursor.com/u/jonathanbossenger)\
**Post date:** [February 5, 2025, 8:07am UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/11 "2025-02-05T08:07:18Z")

</div>

Yup, that worked on my M1 MacBook. I was also able to get it to stop asking me to install PowerShell on my Ubuntu workstation using a similar set of settings

```
"terminal.integrated.automationProfile.linux": {},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.shellIntegration.enabled": false

```

---

<div class="post-metadata">

**Author:** ![webdevtodayjason](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/webdevtodayjason/32/8971_2.png) [@webdevtodayjason](https://forum.cursor.com/u/webdevtodayjason)\
**Post date:** [February 6, 2025, 6:34pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/12 "2025-02-06T18:34:33Z")

</div>

Where is the settings.json file?

Sorry I am a little lost.

I can see that it is trying to start this:

```auto
"/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1"'

```

Every time. I clicked the settings ICON and in the AI RULES added:

```auto
- Always use the default OS terminal over Powershell for running commands, except if it’s on a Windows machine

"terminal.integrated.automationProfile.linux": {},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.shellIntegration.enabled": false

```

Is this not right?

Thank you for your help.  
-J

---

<div class="post-metadata">

**Author:** ![jonathanbossenger](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jonathanbossenger/32/24482_2.png) [@jonathanbossenger](https://forum.cursor.com/u/jonathanbossenger)\
**Post date:** [February 9, 2025, 10:25am UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/13 "2025-02-09T10:25:36Z")

</div>

> Yup, that worked on my M1 MacBook. I was also able to get it to stop asking me to install PowerShell on my Ubuntu workstation using a similar set of settings

Circling back here, while it does seem to work, it runs a different terminal from my OS terminal. So I have node v 20 installed on my OS, but the version running in Cursor is only 16

---

<div class="post-metadata">

**Author:** ![jonathanbossenger](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jonathanbossenger/32/24482_2.png) [@jonathanbossenger](https://forum.cursor.com/u/jonathanbossenger)\
**Post date:** [February 9, 2025, 10:27am UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/14 "2025-02-09T10:27:17Z")

</div>

On my MacBook it’s located in /Users/myusername/Library/Application Support/Cursor/User/settings.json

---

<div class="post-metadata">

**Author:** ![datebook2704eobdslk](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@datebook2704eobdslk](https://forum.cursor.com/u/datebook2704eobdslk)\
**Post date:** [March 25, 2025, 8:21pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/15 "2025-03-25T20:21:18Z")

</div>

I have a macos, and I found that adding to the settings

(CMD+SHIFT+P → User Settings)

“terminal.integrated.defaultProfile.osx”: “zsh”,

and restarting the cursor app made it work in a quick and easy manner.

I hope this helps anyone so far and maybe the cursor team will use this forum thread and resolve the issue in a generic way

---

<div class="post-metadata">

**Author:** ![joshuaohana](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joshuaohana/32/29751_2.png) [@joshuaohana](https://forum.cursor.com/u/joshuaohana)\
**Post date:** [July 9, 2025, 5:20pm UTC](https://forum.cursor.com/t/having-issues-with-powershell-macbook-apple-silicon/45321/16 "2025-07-09T17:20:21Z")

</div>

this worked perfectly for me, was a very frustrating problem before, thanks!
