Skip to content

powershell-editor-services: writes session file to working directory #61

@gtbuchanan

Description

@gtbuchanan

Bug

The powershell-editor-services plugin doesn't set -SessionDetailsPath in its launch args. PSES defaults to writing PowerShellEditorServices.json to the current working directory, which pollutes the user's project with an untracked file.

Suggested fix

Add -SessionDetailsPath to the -Command args in .lsp.json, pointing to a temp directory:

-SessionDetailsPath ([System.IO.Path]::Combine($env:TEMP, 'pses-session.json'))

This is how the VS Code PowerShell extension avoids the same problem.

Environment

  • Windows 11
  • Claude Code 2.1.81
  • PowerShellEditorServices 4.4.0
  • pwsh 7.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions