Skip to content

PowerShell profile not loaded and inconsistent shell versions on Windows #17393

Closed as not planned

Description

@moyaspace

Description

Bug Summary:

 OpenCode has multiple issues with PowerShell profile loading on Windows:

 1. Inconsistent PowerShell version:
    - bash tool → PowerShell 7.5.4
    - Shell input box / Agent responses → PowerShell 5.1

 2. Profile not loaded:
    - OpenCode's Shell input box executes commands without loading PowerShell profile
    - Custom functions (ll, la, lla), aliases, and environment variables are unavailable
    - Even though "PowerShell 5 配置文件已加载" message appears, the profile functions are not actually loaded

 3. Expected behavior:
    - Should load PowerShell profile regardless of which shell is used
    - Should use consistent PowerShell version (preferably the one OpenCode was launched from)

 Environment:
 - Windows
 - PowerShell 7.5.4 (pwsh)
 - PowerShell 5.1 (powershell)
 - OpenCode launched from PowerShell 7

Plugins

No response

OpenCode version

1.2.24

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 11

Terminal

pwsh

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 13, 2026
  2. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

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

    Please consider whether #17372 already covers your report, or if you'd like to close one and consolidate the details into the other.

  3. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions