Skip to content

Agent server “opencode new thread” stuck on loading when workspace is Git repo #46890

Description

@cocohub001

Reproduction steps

  1. Open a workspace folder that contains a .git directory.
  2. In agent-server, click “opencode new thread”.
  3. Observe it remains stuck on “loading”.

Current vs. Expected behavior

Expected Result**
A new thread should open normally.

Actual Result
The UI remains in a perpetual loading state.

Notes**

  • Works fine in a non‑Git folder (no .git directory).
  • This seems directly tied to whether the workspace is under Git.

Zed version and system specs

  • Zed version: [Zed 0.219.4 ]
  • OS: [windows11]
  • Agent server / OpenCode version: [Compatible with any version of Windows]

Attach Zed log file

Test files attached:

test: Reproduces the #[bug.]

test2: Works as expected.

test.zip

test2.zip

Relevant Zed settings

settings.json
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
  "agent": {
    "always_allow_tool_actions": true,
    "default_profile": "write",
    "default_model": {
      "provider": "zed.dev",
      "model": "claude-sonnet-4-5-thinking",
    },
    "model_parameters": [],
  },
  "context_servers": {
    "mcp-server-context7": {
      "settings": {
        "context7_api_key": "",
      },
    },
    "github-mcp-server": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "",
      },
    },
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"],
    },
    "exa": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.exa.ai/mcp"],
      "env": {
        "EXA_API_KEY": "",
      },
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"],
    },
  },
  "telemetry": {
    "diagnostics": false,
    "metrics": false,
  },
  "terminal": {
    "shell": {
      "program": "pwsh",
    },
  },
  "base_keymap": "Cursor",
  "ui_font_size": 16,
  "buffer_font_size": 15,
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark",
  },
}

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aiRelated to Agent Panel, Edit Prediction, Copilot, or other AI featuresnever staleto keep the stalebot awayreach:many usersBugs that happen for at least a third of the users across all platforms and kinds of usageseverity:S2Average run-of-the-mill bugs; a feature is broken but only partiallystate:needs reproNeeds reproduction steps and/or someone to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions