Codebase does not add any files to my context

I try to add the Codebase but it is not adding any files to the context. I have checked the index and my project is indexed and yet any time I use @codebase it doesn’t add any files. Note that I use the OPENAI API key and I cannot use the reasoning step feature because I do not have access to GPT4-32k (as most people with API access do not have access to). I have tried many queries and it never adds any files to context. If I manually add the files the contextually accurate ansers are provided. This is the similar issue to: How to fix? [The model gpt-3.5-turbo does not work with your current plan or api key]

When I delete the index the code base search works fine.

I suspect that this issue is related to the models for which I have access to with OpenAI as my “reasoning” function also does not work. I suspect that these modes use models I do not have access to and fail without error.

Edit: Also, another datapoint is that OpenAI cut-off access to a bunch of models today. This feature was working on this OpenAI account yesterday but my work account it did not. Today it does not work on either account.

Any chance that this can be looked at? I’ve seen two people with two different accounts with the same issue. I suspect that no-one usint OpenAI key can do codebase references anymore. So, it should be easy to reproduce. I can delete the index and it works, sort of, but the quality really sucks. I want to roll out cursor for our company and chat with codebase is like the key selling feature. So, it would be really nice to get this working.

Same, would be super appreciated. And I don’t use my own OpenAI Api key! I did at one point, but cannot get rid of this issue for the life of me :<

Thanks for the report! Would you be able to send screenshots/screen recordings of what happens when you use @codebase? That would help us debug.

When I use indexing and request codebase I get no files in my context. Example below:
Indexed:

Output:

When I delete the index and do it again, I get a file search (which isn’t as good as the index method when looking over large, complex code bases).

Not indexed:

Output

OK… I should note that this issue was with the main release of cursor:

Version: 0.22.1
VSCode Version: 1.85.1
Commit: 20d6b2fe0f43a91764e828b77e985d1380d3ca20
Date: 2024-01-08T23:25:28.010Z
Electron: 25.9.7
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

When I try with the nightly release it seems it works:

Version: 0.22.0-nightly
VSCode Version: 1.85.1
Commit: ab96ed4313943a80cb4902b09b259e5b0fd001e9
Date: 2024-01-07T18:46:08.723Z
Electron: 25.9.7
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

I’m wondering when can I expect the fixed version to be released in a main release? If I’m doing a company wide release of an IDE, I really want to do that with the main release.

Hmmm, interesting… It doesn’t look like anything relevant to codebase indexing changed between those two releases. Perhaps it is a statefulness problem.

@arvid220u it seems to be a WSL issue. When I run the codebase reference in WSL then it doesn’t work. However, when I run it outside WSL then it works. It worked in the nightly because I couldn’t get WSL working due to some version conflict on the VS code WSL server. So, I tried it outside WSL. When I try it outside WSL with the main version it works.

Ohhh. Thank you so much for pinning it down for us!! We will put this down as a bug report and try to fix it.

1 Like

@jpoline77 Update 0.22.1-nightly fixes codebase search in WSL. Does it work for you now?

I can’t seem to run the nightly version and the regular version. I get an error when trying to start WSL with the nightly version: “Failed to connect to the remote extension host server (Error: Connection error: Client refused: version mismatch: renderer: 21465c04a600d8c53e5440723959c4715f7fd089 !== server: ecfbaf72d176819d122080bc0b8bcd76cc586e10)”

@Jakob any hints on how to get WSL working on nightly and regular at the same time?

@Jakob I tried nightly:
Version: 0.22.1-nightly
VSCode Version: 1.85.1
Commit: 21465c04a600d8c53e5440723959c4715f7fd089
Date: 2024-01-16T07:08:02.762Z
Electron: 25.9.7
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

I had to uninstall cursor, run "Fix WSL script " and then I could run WSL in nightly.

Even with nightly, indexing does not work still.

No, it still seems completely broken in WSL for me in version 0.32.8.

Hey all - Adding that I can’t get @codebase to work either.

Here’s some things I tried, maybe something here will help debug:

Let’s try w/ a completely new/blank project, and add an index.html, index.js

First thing, it says the codebase is already indexed. Is that expected?

I deleted / re-synced the index

It references files that don’t exist.

Or says there’s no code to review.

This is the js file contents. Ostensibly we need async/await to log the message. Goal is for cursor to point this out.

Adding the file directly and it works as expected:

About cursor:

Version: 0.36.2

VSCode Version: 1.89.1

Commit: 9a6d781540ba2732cf26551c07629e68121c6580

Date: 2024-07-07T21:57:45.723Z (2 days ago)

Electron: 28.2.8

ElectronBuildId: undefined

Chromium: 120.0.6099.291

Node.js: 18.18.2

V8: 12.0.267.19-electron.0

OS: Darwin x64 20.6.0

Logs:

2024-07-09 22:26:50.654 [info] Repo client: syncing embeddings with backend: https://repo42.cursor.sh
2024-07-09 22:26:50.654 [error] Error: Command failed: git config --get remote.origin.url

at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:517:28)
at Pipe.<anonymous> (node:net:350:12)

2024-07-09 22:26:50.654 [info] Creating merkle client.
2024-07-09 22:26:50.654 [info] Done creating merkle client.
2024-07-09 22:26:50.654 [info] Doing a startup handshake.
2024-07-09 22:26:50.656 [info] Finished initializing merkle tree in 33.98751699924469 ms.
2024-07-09 22:26:50.664 [info] Doing the initial handshake with hash:
2024-07-09 22:26:50.676 [info] Handshake start
2024-07-09 22:26:50.708 [warning] Error reading high level folder description. Ignoring. Error: ENOENT: no such file or directory, open ‘/Users/foo/Library/Application Support/Cursor/User/workspaceStorage/9825028deb274c34eed778d95bf9ccc2/anysphere.cursor-retrieval/high_level_folder_description.txt’
2024-07-09 22:26:51.469 [info] Handshake timing: 803.935909986496
2024-07-09 22:26:51.469 [info] Handshake result:
2024-07-09 22:26:51.469 [info] Starting fast remote sync.
2024-07-09 22:26:51.470 [info] Total num embeddable files: 0
2024-07-09 22:26:51.470 [info] Root hash:
2024-07-09 22:26:51.470 [info] Starting repository upload from scratch.
2024-07-09 22:26:51.471 [info] Uploading 0 files.
2024-07-09 22:26:51.726 [info] Finished indexing repository.
2024-07-09 22:26:51.726 [info] Indexing job successfully done or aborted.
2024-07-09 22:28:47.871 [info] Search by message took 22.431761026382446ms for query “”
2024-07-09 22:28:47.872 [info] Search by sha took 21.743582010269165ms for query “”
2024-07-09 22:29:34.587 [info] Setting indexing intent to should-index
2024-07-09 22:29:34.587 [info] Creating merkle client.
2024-07-09 22:29:34.587 [info] Done creating merkle client.
2024-07-09 22:29:34.587 [info] Doing a startup handshake.
2024-07-09 22:29:34.589 [info] Finished initializing merkle tree in 1.81660795211792 ms.
2024-07-09 22:29:34.589 [info] Doing the initial handshake with hash:
2024-07-09 22:29:34.590 [info] Handshake start
2024-07-09 22:29:34.726 [info] Handshake timing: 136.63102209568024
2024-07-09 22:29:34.726 [info] Handshake result:
2024-07-09 22:29:34.727 [info] Starting fast remote sync.
2024-07-09 22:29:34.727 [info] Total num embeddable files: 0
2024-07-09 22:29:34.729 [info] Root hash:
2024-07-09 22:29:34.729 [info] Starting repository upload from scratch.
2024-07-09 22:29:34.730 [info] Uploading 0 files.
2024-07-09 22:29:35.016 [info] Finished indexing repository.
2024-07-09 22:29:35.016 [info] Indexing job successfully done or aborted.
2024-07-09 22:29:42.127 [info] Search by message took 23.04231297969818ms for query “cod”
2024-07-09 22:29:42.128 [info] Search by sha took 22.384735941886902ms for query “cod”
2024-07-09 22:29:43.595 [info] Search by message took 22.262972950935364ms for query “”
2024-07-09 22:29:43.596 [info] Search by sha took 21.56047797203064ms for query “”
2024-07-09 22:29:47.843 [info] Search by message took 23.282418966293335ms for query “”
2024-07-09 22:29:47.844 [info] Search by sha took 22.93535590171814ms for query “”
2024-07-09 22:36:23.810 [info] Search by message took 22.69935691356659ms for query “”
2024-07-09 22:36:23.811 [info] Search by sha took 22.04043996334076ms for query “”
2024-07-09 22:36:28.037 [info] Search by message took 20.564116954803467ms for query “”
2024-07-09 22:36:28.037 [info] Search by sha took 20.113709092140198ms for query “”
2024-07-09 22:36:44.368 [info] Search by message took 22.377357959747314ms for query “”
2024-07-09 22:36:44.368 [info] Search by sha took 21.613535046577454ms for query “”
2024-07-09 22:36:47.729 [info] Search by message took 22.021772027015686ms for query “”
2024-07-09 22:36:47.730 [info] Search by sha took 21.221837043762207ms for query “”
2024-07-09 22:36:51.279 [info] Search by message took 22.87226903438568ms for query “”
2024-07-09 22:36:51.280 [info] Search by sha took 22.593008995056152ms for query “”
2024-07-09 22:37:08.312 [info] Search by message took 22.26230502128601ms for query “”
2024-07-09 22:37:08.313 [info] Search by sha took 21.69258201122284ms for query “”
2024-07-09 22:37:32.302 [info] Search by message took 23.501721024513245ms for query “”
2024-07-09 22:37:32.303 [info] Search by sha took 23.08992600440979ms for query “”
2024-07-09 22:39:35.419 [info] Creating merkle client.
2024-07-09 22:39:35.419 [info] Done creating merkle client.
2024-07-09 22:39:35.419 [info] Doing a startup handshake.
2024-07-09 22:39:35.422 [info] Finished initializing merkle tree in 2.9358479976654053 ms.
2024-07-09 22:39:35.423 [info] Doing the initial handshake with hash:
2024-07-09 22:39:35.424 [info] Handshake start
2024-07-09 22:39:35.812 [info] Handshake timing: 388.63423204421997
2024-07-09 22:39:35.813 [info] Handshake result:
2024-07-09 22:39:35.814 [info] Starting fast remote sync.
2024-07-09 22:39:35.815 [info] Total num embeddable files: 0
2024-07-09 22:39:35.815 [info] Root hash:
2024-07-09 22:39:35.815 [info] Finished indexing repository.
2024-07-09 22:39:35.815 [info] Indexing job successfully done or aborted.
2024-07-09 22:49:35.397 [info] Creating merkle client.
2024-07-09 22:49:35.398 [info] Done creating merkle client.
2024-07-09 22:49:35.398 [info] Doing a startup handshake.
2024-07-09 22:49:35.399 [info] Finished initializing merkle tree in 1.708285927772522 ms.
2024-07-09 22:49:35.400 [info] Doing the initial handshake with hash:
2024-07-09 22:49:35.401 [info] Handshake start
2024-07-09 22:49:35.665 [info] Search by message took 27.129860043525696ms for query “”
2024-07-09 22:49:35.665 [info] Search by message took 22.72213900089264ms for query “”
2024-07-09 22:49:35.666 [info] Search by sha took 25.638005018234253ms for query “”
2024-07-09 22:49:35.667 [info] Search by sha took 23.6370609998703ms for query “”
2024-07-09 22:49:35.783 [info] Handshake timing: 382.9510979652405
2024-07-09 22:49:35.784 [info] Handshake result:
2024-07-09 22:49:35.784 [info] Starting fast remote sync.
2024-07-09 22:49:35.784 [info] Total num embeddable files: 0
2024-07-09 22:49:35.785 [info] Root hash:
2024-07-09 22:49:35.785 [info] Finished indexing repository.
2024-07-09 22:49:35.785 [info] Indexing job successfully done or aborted.
2024-07-09 22:49:39.869 [info] Search by message took 27.28352403640747ms for query “”
2024-07-09 22:49:39.871 [info] Search by sha took 28.21221399307251ms for query “”
2024-07-09 22:49:39.872 [info] Search by message took 25.044069051742554ms for query “”
2024-07-09 22:49:39.872 [info] Search by sha took 23.65324294567108ms for query “”
2024-07-09 22:49:54.091 [info] Search by message took 25.68826699256897ms for query “”
2024-07-09 22:49:54.093 [info] Search by message took 24.441290974617004ms for query “”
2024-07-09 22:49:54.094 [info] Search by sha took 25.07480800151825ms for query “”
2024-07-09 22:49:54.094 [info] Search by sha took 27.534507989883423ms for query “”
2024-07-09 22:49:56.986 [info] Search by message took 57.68070900440216ms for query “”
2024-07-09 22:49:56.989 [info] Search by message took 56.556471943855286ms for query “”
2024-07-09 22:49:56.991 [info] Search by message took 50.08395707607269ms for query “”
2024-07-09 22:49:56.991 [info] Search by sha took 61.691022992134094ms for query “”
2024-07-09 22:49:56.994 [info] Search by sha took 58.555001974105835ms for query “”
2024-07-09 22:49:56.997 [info] Search by sha took 53.68426489830017ms for query “”
2024-07-09 22:50:02.414 [info] Search by message took 22.272488951683044ms for query “”
2024-07-09 22:50:02.415 [info] Search by sha took 21.989943981170654ms for query “”
2024-07-09 22:50:10.007 [info] Search by message took 27.086344003677368ms for query “cod”
2024-07-09 22:50:10.007 [info] Search by sha took 26.316220998764038ms for query “cod”
2024-07-09 22:50:10.214 [info] Search by message took 22.62847101688385ms for query “code”
2024-07-09 22:50:10.215 [info] Search by sha took 22.468459010124207ms for query “code”
2024-07-09 22:50:11.030 [info] Search by message took 22.73038101196289ms for query “”
2024-07-09 22:50:11.031 [info] Search by sha took 22.08418297767639ms for query “”
2024-07-09 22:50:20.026 [info] Search by message took 21.590874075889587ms for query “”
2024-07-09 22:50:20.026 [info] Search by sha took 20.96058201789856ms for query “”

Versión: 0.41.3
Confirmar: 1.91.1
Fecha: 51c8aff7cb5a89f4a0e462fbacab938bdbfaf140
Electron: 2024-09-25T17:13:50.377Z
ElectronBuildId: 29.4.0
Chromium: undefined
Node.js: 122.0.6261.156
V8: 20.9.0
SO: 12.2.281.27-electron.0

In my linux install, regardeles I have 100% indexed the code, no files are added to context with codebase and I always get a general solution.