GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — OpenCode hangs indefinitely; built-in Azure and Shell plugins fail to initialize on Windows ; wrong working directory recognition · Issue #66507 · anomalyco/opencode

OpenCode hangs indefinitely; built-in Azure and Shell plugins fail to initialize on Windows ; wrong working directory recognition #66507

New issue
Copy link
New issue
Copy link
Duplicate
Duplicate
OpenCode hangs indefinitely; built-in Azure and Shell plugins fail to initialize on Windows ; wrong working directory recognition#66507
Copy link
Labels
area/coreAgent loop, tools and configplatform/windowsWindowstype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@MITHULESH07
MITHULESH07
opened on Nov 26, 2026
Issue body actions

Description

I'm experiencing an issue where OpenCode remains in the working state indefinitely when executing tasks. It does not complete the operation, even for simple commands.

The working directory is always set to "C:/" when creating a

opencode.log

opencode.log

project for empty folder.

Additionally, the built-in Azure provider and Shell plugins initially failed to initialize.

Environment

  • OS: Windows
  • OpenCode version: 2.4.1
  • Terminal: Windows PowerShell
  • PowerShell 7: Installed (pwsh.exe is now detected)
  • Project directory: portfolio

Errors observed

Initially, the OpenCode logs reported the following errors:

Azure provider plugin:

EACCES: permission denied, lstat
'C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\python.exe\az.exe'

Shell plugin:

EACCES: permission denied, lstat
'C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\python.exe\pwsh.exe'

The errors appeared to be related to an invalid PATH entry:

C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\python.exe

This entry points to an executable rather than a directory.

Troubleshooting performed

  1. Removed the malformed PATH entry from the current PowerShell session.
  2. Verified that the invalid entry was no longer present in the session PATH.
  3. Installed PowerShell 7 using:
    winget install --id Microsoft.PowerShell --source winget
  4. Verified that pwsh.exe is now detected using:
    Get-Command pwsh
  5. Restarted OpenCode in a new PowerShell session.
  6. Tested a simple Shell command:
    Write-Output "Shell plugin working"

Current behavior

Despite these troubleshooting steps, OpenCode still remains in the working state indefinitely when executing tasks.

Expected behavior

  • Built-in plugins should initialize successfully.
  • Simple Shell commands should execute and return their output.
  • Build mode should complete tasks or report an actionable error instead of remaining in the working state indefinitely.

Actual behavior

OpenCode continues working indefinitely without completing the operation.

Additional information

I can provide the OpenCode logs and further debugging information if needed.

Could this be related to plugin initialization, shell process execution, or PATH resolution on Windows?
:::

Activity

  1. opencodejr commented on Nov 26, 2026

    @opencodejr
    opencodejrBot
    on Nov 26, 2026
    Contributor
    More actions

    Thanks for the detailed report and the logs! I think this is a duplicate of #62501.

    The log you attached (OpenCode 2.4.1) shows the same EACCES: permission denied, lstat '...\WindowsApps\python.exe\<tool>.exe' error, for az.exe, pwsh.exe and rg.exe. When OpenCode looks for Microsoft Store app aliases on Windows, it adds the tool's file name to every PATH entry and checks the result. When a PATH entry is a file (here ...\WindowsApps\python.exe), that check fails with EACCES and the error isn't caught. In your log, the Azure plugin then fails to load, the shell tool is disabled, and file searches (/api/fs/find) fail. That fits the session hanging, though I haven't reproduced it.

    Why it may still hang after your PATH fix: all of your log comes from a single background service process (serve --service), and the errors continue until the end of the log. OpenCode's background server owns sessions and plugins. Changing PATH in one PowerShell window probably doesn't reach a service that is already running. Something you could try (I haven't tested it on Windows):

    1. Remove the ...\WindowsApps\python.exe entry from your user PATH in Windows Environment Variables, not only in one session. If you need that folder, use the folder C:\Users\<you>\AppData\Local\Microsoft\WindowsApps instead.
    2. Open a new terminal and run opencode service restart.

    About the C:/ working directory: in your log, sessions in folders without their own .git (for example Portfolio and C:\portfolio) watch C:\.git\HEAD, and snapshots there fail on C:\DumpStack.log.tmp. So OpenCode seems to treat C:\ as the root of a git repository. Could you check whether a C:\.git folder exists? That could explain it.

    Possible duplicates and related issues, ordered by likelihood:

    • issue #62501: the same EACCES ... WindowsApps\python.exe\pwsh.exe error, caused by a PATH entry that points at a file
    • Windows: pwsh installed as a Store app-execution alias is not resolved, so the shell falls back to Windows PowerShell 5.1 #55255: the earlier problem with PowerShell 7 installed from the Microsoft Store. The change that fixed it (fix(core): find Microsoft Store PowerShell 7 on Windows #61952) added the search that throws this error
    • project: empty git repo resolves to drive root C:/ on Windows, sessions show under C: root #59889: on Windows, a project resolving to the drive root C:/, which may be related to your working-directory problem

    I'm closing this issue now as a duplicate of #62501. Please add your details there, especially that az.exe and rg.exe are affected as well as pwsh.exe, and that sessions hang. If you think this is a different problem, reply here and the issue will reopen.

  2. opencodejr
    closed this as a duplicateof issue #62501 on Nov 26, 2026
  3. opencodejr
    added
    area/coreAgent loop, tools and config
    platform/windowsWindows
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreAgent loop, tools and configplatform/windowsWindowstype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.