Skip to content

Expand-Archive error on Windows PowerShell when loading skills in v1.14.18 #23457

Closed as not planned

Description

@dylanhaskins

Description

When loading any skill on opencode CLI on Windows powershell, the skill fails to load do to an Expand-Archive error. (any agent run grep operation will also do the same)

Expand-Archive : Cannot validate argument on parameter 'LiteralPath'. The argument is null or empty. Provide an
argument that is not null or empty, and then try the command again.
At line:1 char:29

  • Expand-Archive -LiteralPath $args[0] -DestinationPath $args[1] -Force ...
  •                         ~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Expand-Archive], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Expand-Archive

Likely cause .... SkillTool calls rg.files(...) when loading a skill (packages/opencode/src/tool/skill.ts, line ~43).
In v1.14.18, ripgrep resolution now does:

  1. find system rg, else
  2. download ripgrep zip/tarball,
  3. extract it,
  4. cache binary.

On Windows zip extraction now runs:
powershell.exe -NoProfile -Command "Expand-Archive -LiteralPath $args[0] -DestinationPath $args[1] -Force"


(from packages/opencode/src/file/ripgrep.ts, around line 258)

***Temporary Workaround ***

Installing ripgrep beforehand resolves the error (winget install BurntSushi.ripgrep.MSVC)

Plugins

No response

OpenCode version

1.14.18

Steps to reproduce

Using v1.14.18 on windows powershell request the agent load any skill.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 20, 2026
  2. kagura-chen commented on Apr 20, 2026

    @kagura-chen
    Contributor

    I'd like to work on this.

    Root cause: PowerShell's -Command parameter doesn't reliably populate $args from trailing positional arguments — especially in Windows PowerShell 5.x. The archive and dir strings are passed after the -Command string at line 258 of ripgrep.ts, but $args[0] evaluates to null.

    Fix: Inline the archive and destination paths directly into the PowerShell command string (with proper single-quote escaping) instead of relying on $args.

  3. added a commit that references this issue on Apr 20, 2026
    44c6e01
  4. asertym commented on Apr 20, 2026

    @asertym

    Still an issue unfortunately. Forced to downgrade to 1.14.17.

  5. kagura-chen commented on Apr 20, 2026

    @kagura-chen
    Contributor

    Sorry to hear it's still broken @asertym. Is this with v1.14.18 specifically, or a later version? I'll look into submitting a fix — the PowerShell $args handling definitely needs a different approach for Windows PowerShell 5.x.

  6. asertym commented on Apr 20, 2026

    @asertym

    @kagura-agent problem persists with v1.14.18 and v1.14.19 as well. Since the problem wasn't fixed between these versions, im thinking it was a change made from v1.14.17 to v1.14.18 that results in these issues appearing. Note that calling @filename also does not work, it returns no files found, which may be related to the same powershell issues.

  7. Hona commented on Apr 21, 2026

    @Hona
    Member

    are you certain this is not working on v1.14.19?

    can you please share the logs

  8. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  9. chenxch commented on May 13, 2026

    @chenxch

    When I rolled back to version 1.14.17, the problem persisted.

  10. github-actions commented on Jul 13, 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