Bugfix: Why does the VSCode extension Repos tab show 404 for /ai-api...

Documentation for Sessions

🐛 Bugfix: Why does the VSCode extension Repos tab show 404 for /ai-api...

Date: 2026-03-24
Time: 18:57:05 UTC
Session: gspace1-264.7
Agent: backend
Confidence: 100%
Status: ✅ Documented


📋 Decision Context

Question:

Why does the VSCode extension Repos tab show 404 for /ai-api/git/repos when curl to localhost:3001 works?

Task: Not specified


🎯 Decision Made

Chosen:

Root cause: Cursor settings had vitto.environment=production, so getBackendUrl() returned https://ai-api.gograb.space instead of http://localhost:3001. The production server doesn't have the git-proxy module deployed. Fix: change vitto.environment to local.

Options Considered:

  1. Add full URL logging to git-operations.handler.ts error messages
  2. Add environment indicator to extension UI
  3. Default to local when localhost backends are detected

💭 Reasoning

The 404 error message showed the NestJS response format, confirming a server was responding — just not the local one. curl to localhost:3001 returned 200. The discrepancy meant the extension was hitting a different server. Tracing getBackendUrl() → environment.backendUrl → envSetting revealed production mode returns https://ai-api.gograb.space. Checking Cursor User/settings.json confirmed vitto.environment=production. This is a configuration issue, not a code bug, but it cost significant debugging time because the error message didn't include the full URL (host+port), only the path.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation