Skip to content

When Copilot creates a new file, I get this error: [error] [GitServiceImpl][getRepositoryFetchUrls] Failed to read remotes from .git/config: Error: ENOENT: no such file or directory, stat {{path_to_file}} #278865

@gustavoaca1997

Description

@gustavoaca1997
  • Copilot Chat Extension Version: 0.33.2
  • VS Code Version: 1.106.1 1.106.2
  • OS Version: Microsoft Windows 11 Enterprise, 10.0.28000 N/A Build 28000
  • Feature (e.g. agent/edit/ask mode): Agent mode
  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): It happens with Claude 4.5 and Gemini 3 Pro
  • Logs:
[error] [GitServiceImpl][getRepositoryFetchUrls] Failed to read remotes from .git/config: Error: ENOENT: no such file or directory, stat 'c:\path\to\the\new\file'

Steps to Reproduce:

  1. Ask Agent mode to do a task that requires creating new files
  2. Include in your copilot-instructions.md to use #tools:runSubAgent as much as possible. I'm not sure if this is relevant.
  3. At some point, the agent will hang forever in one task, and it fou look at the logs of Github Copilot Chat, you will always find an error like that one.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugchat-agent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions