opencode keeps creating "-p" subdirectory on Windows 11 #3277

Open
opened 2026-02-16 17:39:29 -05:00 by yindo · 2 comments
Owner

Originally created by @slimshader on GitHub (Dec 3, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Whenever working with opencode (I use opencode with compination of OpenSpec) it creates subdirecly "-p" in project directly. I noticed it usses command 'mkdir -p"

OpenCode version

1.0.128

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Windows Termianal

Originally created by @slimshader on GitHub (Dec 3, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Whenever working with opencode (I use opencode with compination of OpenSpec) it creates subdirecly "-p" in project directly. I noticed it usses command 'mkdir -p" ### OpenCode version 1.0.128 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="382" height="51" alt="Image" src="https://github.com/user-attachments/assets/612c096b-27e9-40a3-8412-30458dcc8b83" /> ### Operating System Windows 11 ### Terminal Windows Termianal
yindo added the windowsbug labels 2026-02-16 17:39:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 3, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3340: agents will create empty folders it didn't mean to when using mkdir -p {src,test,...} - Similar issue where mkdir -p syntax isn't being parsed correctly
  • #4592: Leftover dot-prefixed temp directory in global node_modules breaks npm -g update on Windows - Related to temporary directory creation on Windows

Both suggest a potential issue with how OpenCode handles mkdir commands and directory creation on Windows platforms. Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 3, 2025): This issue might be a duplicate of existing issues. Please check: - #3340: agents will create empty folders it didn't mean to when using `mkdir -p {src,test,...}` - Similar issue where mkdir -p syntax isn't being parsed correctly - #4592: Leftover dot-prefixed temp directory in global node_modules breaks npm -g update on Windows - Related to temporary directory creation on Windows Both suggest a potential issue with how OpenCode handles mkdir commands and directory creation on Windows platforms. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 3, 2025):

is the agent doing that or is it something behind the scenes

@rekram1-node commented on GitHub (Dec 3, 2025): is the agent doing that or is it something behind the scenes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3277