[Bug] Windows repository cloning fails while creating an existing drive root
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 73/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- electron, node.js, typescript
Research direction
Read apps/server/src/sourceControl/SourceControlRepositoryService.ts, especially prepareDestination at lines 221–247. Reproduce on Windows with a new destination directly under an existing drive root and check how parent directory preparation handles that root. Done means the destination is prepared and cloning proceeds without the EPERM error.
Written by the indexing model from the issue text.
Description
What happened
T3 Code's desktop app on Windows could not clone https://github.com/xMrAfonso/comark-loops. The user reported: "For some reason it doesn't clone projects from my github."
Diagnosis
The latest failed attempt stops in destination preparation, before Git starts cloning. The server attempts a recursive directory creation at the drive root, and Windows returns EPERM: operation not permitted, mkdir 'C:\'.
In SourceControlRepositoryService.prepareDestination, a destination that does not exist causes an unconditional fileSystem.makeDirectory(path.dirname(normalizedDestination), { recursive: true }). For a new folder directly under C:\, its parent is the existing drive root. The code does not first check whether that parent already exists.
Source inspected: https://github.com/pingdotgg/t3code/blob/4f63275ac7885281d245022e65f1e9e8816b1382/apps/server/src/sourceControl/SourceControlRepositoryService.ts#L221-L247
The same failure occurred three times in the local trace. Git access to the repository was verified independently, and a manual clone into a nested directory succeeded. This supports a destination-preparation failure for these attempts, rather than a repository access failure.
A possible fix is to avoid creating an already-existing parent directory, including a Windows drive root. This has not been implemented or tested during triage.
Steps to reproduce
The following minimal reproduction is inferred from the trace and source, and has not been independently repeated in the UI. The original destination input was not captured.
- Run the Windows desktop app.
- Open Add project and choose to clone a GitHub repository.
- Use
https://github.com/xMrAfonso/comark-loops. - Choose a new destination directly under the drive root, for example
C:\comark-loops. - Start the clone.
Expected: the repository is cloned into the new destination.
Observed in the user's trace: preparation fails while attempting mkdir 'C:\', before Git clone runs. The client receives the generic message: Source control repository operation cloneRepository failed for unknown: The source control operation could not be completed.
Version
- Desktop renderer reports:
0.0.46-nightly.20261010.2935. - Separately invoked triage CLI:
0.0.46-nightly.20261010.2948(npx t3@nightly triage). - Diagnosis source checkout: tag
v0.0.46-nightly.20261010.2948, commit4f63275ac7885281d245022e65f1e9e8816b1382; the destination-preparation code above is still present there.
Environment
Windows x64, version 10.0.26200; Node v26.8.2 in the triage context. Electron desktop app with a running local backend.
Evidence
Relevant server trace entries (UTC), with filesystem and provider wrappers summarized and personal paths omitted:
2026-10-10T17:51:19.915Z SourceControlRepositoryService.prepareDestination: Failure
2026-10-10T17:51:29.714Z SourceControlRepositoryService.prepareDestination: Failure
2026-10-10T21:40:08.524Z SourceControlRepositoryService.prepareDestination: Failure
PlatformError: Unknown: FileSystem.makeDirectory (C:\)
[cause]: Error: EPERM: operation not permitted, mkdir 'C:\'
Failure propagates through:
SourceControlRepositoryService.prepareClone
ProjectCloneTracker.start
ws.rpc.projectClone.start
Independent Git check:
git ls-remote https://github.com/xMrAfonso/comark-loops.git HEAD
b8f501e40534e81d4026b28d686a7b9f2ac1173b HEAD
Related issues
No matching issue was found in searches for clone failures involving Windows, EPERM, mkdir, or prepareDestination. This report concerns preparation of the clone destination before Git executes.
Fix applied or workaround
Ran:
git clone https://github.com/xMrAfonso/comark-loops.git C:\Central\VSC\comark-loops
The clone succeeded, with a clean checkout tracking origin/master at b8f501e40534e81d4026b28d686a7b9f2ac1173b. The user was instructed to add that checkout through Add project -> Local folder; that UI step has not been verified. No T3 source, configuration, or database was modified.
Filed by
Codex (GPT-6.1 Sol) via T3 Code triage.
- Dominant language
- TypeScript
- Stars
- 24.8k
- Forks
- 6.4k
- Avg merge
- 5h 30m
- Merged PRs (30d)
- 215
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pingdotgg/t3code
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[Bug]: Diff panel hides the current branch name and the arrow overlaps the base ref when the panel is narrowPossibly taken A pull request linked to this issue is open or already merged. Openaccepted bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pingdotgg/t3code#19048 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
[Bug]: iOS still shows "Failed to connect. Retrying" on every resume (follow-up to #5695)Possibly taken @otavio claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo rootPossibly taken @Mnigos claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in pingdotgg/t3code
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel/streamdown#673 · 1 reaction ·
Maintainers usually reply within 1 day
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkOpenfactory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
agilepathway/label-checker#721 ·
Maintainers usually reply within 1 day
-
CLI Empathy needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
chromaui/chromatic-cli#1524 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day