By default on Windows, DSH exposes pwsh and disables the official bash tool. Common community workarounds (such as Git Bash or using WSL distributions directly) suffer from weak isolation, state residue, or difficulty integrating official permission presets. The dsh-shell-wsl plugin addresses these pain points by running bash commands in disposable Docker containers. It does not require the model to be aware of any new tools: the model continues to invoke the official bash tool, while the underlying execution environment is replaced by real Linux containers.

Core Features

  • Containerized execution: Runs bash commands in disposable Docker containers and automatically destroys the container after each invocation, ensuring a clean environment.
  • Real Linux environment: Provides a real Linux bash execution environment (based on the WSL2 kernel + Ubuntu 24.04), supporting Linux binaries and standard process semantics.
  • Permission preset integration: Automatically integrates official permission presets and configures mount permissions based on session policies (such as read-only or workspace-write).
  • Zero tool-layer changes: The model continues to use the official bash tool without needing to learn new interfaces or tool definitions.
  • Host execution: The plugin itself runs in a host process, unaffected by the agent tool sandbox.

Prerequisites

Before using this plugin, make sure the following requirements are met:

  1. Docker Desktop: Docker Desktop is running on Windows (with the WSL2 backend), and the docker CLI command is available.
  2. Image pre-pull: Run docker pull ubuntu:24.04 in advance to avoid timeouts on the first invocation.
  3. WSL2 distribution: If using the wsl transport, at least one WSL2 distribution (such as Ubuntu) must be installed.

Installation and Activation

1. Install the plugin

dsh plugin --profile web add dsh-shell-wsl

2. Enable the preset

After installation, enable the WSL container preset to activate the feature. In the Web UI, you can enable the default preset with the following script:

powershell -ExecutionPolicy Bypass -File <plugin dir>\scripts\install-preset.ps1 -SetDefault

Alternatively, copy the presets/wsl-container/ directory to ~/.dsh/.agent-presets/wsl-container/ and switch the default preset to WSL container mode on the Web settings page.

Configuration

1. Bash timeout configuration

Set the Bash command timeout in ~/.dsh/settings.yaml:

bash:
  timeoutMs: 120000

2. Shell property configuration

Modify the configuration entries for shell-wsl in cordis.patch.yml, for example switching the transport or container image:

- id: shell-wsl
  config:
    transport: docker-cli
    image: ubuntu:24.04

Use Cases and Notes

This plugin is suitable for scenarios where Linux development, testing, or automation tasks are needed in a Windows environment and where environment isolation and permission control are required.

Notes:
* The plugin runs with host process permissions. Make sure to review the source code and license before installation.
* It depends on the Docker Desktop service. If Docker cannot be invoked natively from within pure WSL, use the wsl transport.