# Cursor CLI just quits with exit code 1 and no output on macOS VM in CI

**URL:** <https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536>\
**Category:** Bug Reports\
**Tags:** cli, macos, ssh\
**Created:** [February 11, 2026, 6:22am UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536 "2026-02-11T06:22:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![str](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@str](https://forum.cursor.com/u/str)\
**Post date:** [February 11, 2026, 6:22am UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536/1 "2026-02-11T06:22:36Z")

</div>

### Where does the bug appear (feature/product)?

Cursor CLI

### Describe the Bug

I’ve tried to run the Cursor CLI on the macOS VM that is used as a Jenkins executor, and I’ve run into a weird issue: agent installs without problems, I can run commands like `agent --version` and their return the output, but if I try to run `agent -p <prompt>` or just `agent`, CLI just quits, outputs nothing and I see that the exit code is 1.

This happens when I try to use `agent` in a Jenkins job, and it happens when I connect to the VM through SSH and try to use `agent` manually.

What’s weird is that if I connect to the VM through VNC and launch `Terminal.app` in a GUI environment, then the `agent` works.

I though this is the GUI layer issue, as `launchctl managername` returns `Background` for SSH, but I tested that on a normal MBP, and `agent` works through SSH on it.

Any idea how to fix this OR how to debug it further to give you guys more information?

### Steps to Reproduce

1. Install Cursor CLI on macOS VM
2. Use this VM as an executor on Jenkins
3. Try to run `agent` or `agent -p <prompt>`

### Operating System

MacOS

### Version Information

2026.01.28-fd13201

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 11, 2026, 7:53am UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536/3 "2026-02-11T07:53:51Z")

</div>

Hey, thanks for the detailed report.

The difference between the GUI terminal and SSH on a macOS VM is most likely due to how auth credentials are stored. On macOS, `agent login` usually saves tokens in Keychain, which requires the graphical security agent. That isn’t available in SSH or background sessions on a VM, unlike a regular Mac with an always-on GUI user session.

A couple things to try:

1. Use API key auth instead of browser login. This fully bypasses Keychain. Generate a key in your Cursor dashboard (Integrations \> User API Keys), then run:

2. Check what `agent status` shows when running over SSH. That should tell us whether it’s an auth issue or something else.

If the API key approach works over SSH, that would confirm the issue is Keychain access. Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![str](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@str](https://forum.cursor.com/u/str)\
**Post date:** [February 11, 2026, 9:24am UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536/4 "2026-02-11T09:24:26Z")

</div>

I forgot to mention - yes, I use the API key.

I can see the key in the env when I do `echo $CURSOR_API_KEY`, but `agent status` returns:  
`Not logged in`

BUT it also returns `Not logged in` when I launch the `agent` in the GUI environment, but it is definitely authorized and works, cause I can run prompts with for example GPT-5.3 Codex. I haven’t logged in via a web browser there, this is a fresh VM on every start, and I do the fresh install of the Cursor CLI there every time.

---

<div class="post-metadata">

**Author:** ![str](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@str](https://forum.cursor.com/u/str)\
**Post date:** [February 18, 2026, 7:45pm UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536/5 "2026-02-18T19:45:56Z")

</div>

In 2026.02.13-41ac335 I now get this error:  
`Error: Security command failed: Security process exited with code: 36`

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [March 12, 2026, 7:46pm UTC](https://forum.cursor.com/t/cursor-cli-just-quits-with-exit-code-1-and-no-output-on-macos-vm-in-ci/151536/6 "2026-03-12T19:46:34Z")

</div>

Closed on March 12, 2026, 7:46pm UTC

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