Skip to content

[Feature]: Explicit Windows shell selection and ACP effective-shell reporting #474

Open

Description

@lifelover26

Request

Please expose an explicit process-local shell selection option for MiniMax Code's own command tools on Windows, and report the resolved interpreter to ACP clients. Git Bash should be selectable while leaving the current PowerShell default unchanged.

Motivation and observed behavior

We integrate the official mcode ACP harness into OPL DSH. On Windows, our tested official mcode v0.6.3 resolves PowerShell even when Git for Windows is installed and SHELL points to Bash. A tool named bash, or a model explicitly wrapping bash.exe, does not establish that the harness's actual default command interpreter is Bash.

The public shared resolver at third_party/pi-mono/packages/coding-agent/src/utils/shell.ts already accepts a custom shell path; the current main still documents Windows PowerShell preference. The request is a supported way to apply an explicit choice consistently to mcode's own foreground/background operations and expose the result. We have not runtime-tested every newer release.

Suggested interface (names are proposals)

  • An explicit shell executable setting or process-local environment variable, such as MCODE_SHELL_PATH.
  • Validate an absolute existing executable; an invalid explicit selection fails with a useful error rather than falling back to another interpreter.
  • Use the same resolved shell for foreground/background commands and the model's environment description.
  • Optional ACP initialize metadata, for example:
{"_meta":{"minimax-code/shell":{"version":1,"type":"bash","executable":"C:/Program Files/Git/bin/bash.exe","args":["-c"]}}}

The exact setting name, metadata placement, and versioning should follow the maintainers' preferred public API. Clients should be able to verify the effective shell across reconnects; older clients can ignore the optional metadata.

Existing prototype and validation

We have a small local source patch against official v0.6.3, built as a separately selected candidate; it does not replace the official installation. Windows validation covered an executable path containing spaces, real Bash identity/output and nonzero exit status, stdout/stderr streaming, cancellation/timeout cleanup, ACP capability readback, and model-backed command execution with both M3.1-Flash-Preview and M3, including cross-process session recovery. These are observations from the local prototype, not claims about official release support or the entire test suite.

The source patch can be adapted and contributed if maintainers approve the direction. We are opening an issue first in accordance with CONTRIBUTING.md's collaborator-only PR policy. The consuming integration and its explicit support limitations are documented in gaofeng21cn/opl-dsh#6 and https://github.com/gaofeng21cn/opl-dsh/blob/main/docs/minimax-code.md.

Scope

This selects and reports a command interpreter only. It must not change permission modes, approve pending human requests, weaken sandbox enforcement, or silently upgrade restricted tasks to full access. It does not require an OPL-specific agent loop or any MiniMax account/provider changes.

Would maintainers prefer a CLI/config setting or an environment override, and what ACP capability-reporting interface would fit the project?

Activity

  1. added
    enhancementNew feature or request
    cliStandalone mcode: TUI, headless, ACP and source builds/tooling
    on Oct 13, 2026
  2. hetaoBackend commented on Oct 13, 2026

    @hetaoBackend
    Collaborator

    Thanks for the detailed feature request — the motivation (integrating the official ACP harness and needing the resolved interpreter reported back) is clear.

    Triage action: labelled enhancement + cli. Removed from needs-triage.

    What we need from you to scope it (please reply with these):

    1. Should the shell selection be process-local only, or also configurable through config.yaml for a persistent profile?
    2. When ACP reports the resolved shell, do you need the absolute interpreter path, or the resolved name (for example bash.exe) is enough?
    3. Is the current PowerShell default required to stay unchanged, or is changing it acceptable once the option exists?

    If you would like to implement this, a fork PR does not require collaborator access — please open an issue describing the scope first. Note that external PRs are moving from invitation-only to application-based; a fork PR with a linked issue is reviewed within 48 hours.

  3. lifelover26 commented on Oct 15, 2026

    @lifelover26
    Author

    Thanks for the follow-up and for clarifying the contribution policy.

    1. Process-local selection is sufficient for our integration. We launch a dedicated mcode process for each connection, so an explicit CLI option or environment override would meet our needs without changing the user's persistent configuration. A config.yaml setting would be useful but is not required for the initial implementation. If both are supported, the explicit process-local choice should take precedence.

    2. We need the effective absolute interpreter path, rather than only its name. Multiple bash.exe installations can exist, and PATH resolution can change between launches. Ideally ACP would report the resolved shell type, absolute executable path, and invocation arguments—for example, Git Bash with ["-c"]. This lets clients verify the actual interpreter after starting or reconnecting, rather than assuming the requested setting took effect. The metadata key and placement can follow your preferred API.

    3. Please keep the existing PowerShell default unchanged. Bash should be an explicit opt-in. An invalid explicit selection should return a clear error instead of silently falling back to PowerShell.

    We already have a separately built prototype against v0.6.3 and would be happy to adapt it to the current codebase and your preferred interface. The scope would remain shell selection and reporting, without changing permissions or sandbox behavior.

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

    cliStandalone mcode: TUI, headless, ACP and source builds/toolingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions