Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
When running cursor-agent in a GitHub Action the agent successfully completes performs the instructions requested in the prompt, but then hangs indefinitely.
Important: the very same command run in a local shell terminates sucessfully.
Steps to Reproduce
Run the following GitHub Action:
name: Cursor Code Review
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
code-review:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Cursor CLI
run: |
curl https://cursor.com/install -fsS | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH
cursor-agent --version
- name: Perform code review
env:
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
MODEL: auto
run: |
cursor-agent \
--force \
--model="$MODEL" \
--output-format=text \
--print \
"Say hello"
Expected Behavior
I’d expect cursor-agent in the headless mode to exit after processing the prompt.
Screenshots / Screen Recordings
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
cursor-agent: 2025.09.12-4852336
Does this stop you from using Cursor
Yes - Cursor is unusable
