Background agent function is not available in Linux

My operation is as follows:

  1. Use mkdir to create a new directory “test”

  2. Initialize .git using git init

  3. Select background agent mode

  4. Enter any content (I entered “test”)

Then an error will be reported:

Git Not Initialized
The background agent requires a Git repository. Please initialize Git in this repository

My WSL system version:

alice@DESKTOP-APT2VU4:~/test$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

My cursor version:

Version: 0.50.3 (user setup)
Commit: 1.96.2
Date: 7ae22cf8cd5af9e08b62585dd03d10f5f610acf0
Electron: 2025-05-13T02:23:34.020Z
ElectronBuildId: 34.3.4
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.18.3
OS: 13.2.152.41-electron.0
2 Likes

I have the same issue. I have an initialized git repository and get the error: The background agent requires a Git repository. Please initialize Git in this repository.
I am using remote ssh… Probably an issue with remote SSH/WSL

1 Like

It literally says what it needs - a git repository. It also requires the code to be on github, unless that changed from yesterday.

1 Like

I am getting the same thing while trying to run from an initialized GitHub repo (My code is running on an Amazon Linux instance) but the OS shouldnt matter because it needs a github repo. Hopefully the team can provide a solution soon.

Also have this problem. I SSH to a remote AWS instance where my code resides. Git is initialized and the agent is able to make commits / cursor settings confirms git is connected / authorized. And yet the background agent says I don’t have git initialized. It doesn’t make much sense that it should be a problem that my environment is remote given that the background agent runs from my git repo.

1 Like

This issue started to happen with us on Windows today. We were previously able to run Background Agents just fine.

Interestingly, we also get a “No environment.json” warning as well too–even though we indeed have a environment.json file at .cursor/environment.json. This is the first time we are seeing this warning as well.


I also get the “Git Not Initialized” error. The git repository is initialized, the regular Cursor/ VS Code git features are working, and I’ve provided Cursor with GitHub access. I get this whether or not I’m using a devcontainer. Running WSL/Ubuntu.

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