Skip to content

Codex IDE extension in Cursor hangs when workspace root accidentally becomes a large unborn Git repo at $HOME #23191

@Atager228

Description

@Atager228

What version of the IDE extension are you using?

openai.chatgpt 26.5513.21555 (linux-x64)

What subscription do you have?

ChatGPT Pro

Which IDE are you using?

Cursor, connected to a remote Linux server through Cursor Server / Remote SSH.

What platform is your computer?

Linux 6.8.0-111-generic x86_64 x86_64

What issue are you seeing?

I accidentally ran git init in /home/ubuntu, which is the server home directory and contains many unrelated projects, caches, build artifacts, extension state, and tool directories.

After /home/ubuntu became a Git repository, the Codex IDE extension in Cursor stopped loading chats / appeared stuck. Removing /home/ubuntu/.git made Codex load the chat again immediately.

Relevant local log evidence:

Cursor Git opened /home/ubuntu as a repository.
git status -z -uall was repeatedly cancelled.
The repo had no remotes and branch/merge-base lookup failed.
Codex emitted repeated IPC initialization timeouts.
Codex Git repo watcher failed with ENOSPC while watching paths under /home/ubuntu.
Codex Git branch prefetch commands ran with cwd=/home/ubuntu and failed.

Representative log excerpts:
2026-05-17 20:16:53.553 [info] [Model][openRepository] Opened repository: /home/ubuntu
2026-05-17 20:16:54.385 [info] > git status -z -uall [857ms] (cancelled)
2026-05-17 20:16:54.386 [error] [GitHistoryProvider][resolveHEADMergeBase] Failed to resolve merge base for master: Error: No such branch: master.
2026-05-17 20:16:23.722 [warning] [IpcClient] Initialize failed errorMessage=timeout
2026-05-17 20:20:05.413 [warning] [git-repo-watcher] Git repo watcher failed errorCode=ENOSPC ... path=/home/ubuntu

### What steps can reproduce the bug?

1. Use Cursor connected to a remote Linux server.
2. Open a workspace rooted at or operating from `/home/ubuntu`.
3. Have many unrelated directories under `/home/ubuntu`, including caches, build outputs, and several project repos.
4. Accidentally run:

cd /home/ubuntu
git init

5. Open or reload the Codex IDE extension panel in Cursor.
6. Observe that Codex chats do not load / the panel appears stuck.
7. Remove the accidental home-directory repo:

rm -rf /home/ubuntu/.git

8. Observe that Codex starts loading chats again immediately.


### What is the expected behavior?

Codex should not hang or fail to load chats when the editor workspace root accidentally becomes a very large, unborn Git repository.

At minimum, it should degrade gracefully by doing one or more of:

- avoid recursively watching the entire home directory as a Git repo;
- avoid blocking chat hydration/startup on Git repository metadata;
- detect the no-remote/no-commit/no-branch state and continue without Git metadata;
- surface a clear warning such as "workspace root is a very large Git repository" instead of leaving the chat UI stuck;
- recover after watcher or Git commands fail.

### Additional information

Installed extension path on the remote host:
/home/ubuntu/.cursor-server/extensions/openai.chatgpt-26.5513.21555-linux-x64

Remote host:
Ubuntu 24.04.2 LTS
Git: 2.43.0
Workspace/root path: /home/ubuntu

I intentionally did not attach full raw Codex.log files because they may contain private prompts, conversation IDs, local paths, and extension state.

Workaround:
rm -rf /home/ubuntu/.git

I am not asking Codex to support using a whole home directory as a normal Git repo. The request is for the IDE extension to fail gracefully and not block chat loading when the IDE accidentally detects such a repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionperformance

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions