Skip to content

sandbox exec: allow (or document) multi-line command arguments containing newline/CR #2110

Closed as duplicate

Description

@cjagwani

Summary

openshell sandbox exec ... -- <cmd> [args...] rejects any command argument that contains a newline or carriage return with InvalidArgument: "command argument N contains newline or carriage return characters". This blocks passing a multi-line command (for example a bash heredoc, or a small script) as a single argv element.

Impact

Callers that want to run a short multi-line script must fall back to workarounds — semicolon-joined statements, piping the script into the sandbox shell over stdin, or writing a script file into the sandbox first. Passing the script directly as bash -lc '<multi-line>' is the most natural form and is what users reach for.

Request

Allow sandbox exec argv elements to contain \n / \r, forwarding the argument verbatim to the sandbox process, OR document the constraint as intentional so downstream tooling can rely on it.

Downstream context

NVIDIA NemoClaw wraps openshell sandbox exec. It currently validates argv before dispatch and returns a clear error pointing users at the workarounds (NVIDIA/NemoClaw#5980). If OpenShell accepts multi-line argv in a future release, that client-side guard and its docs can be removed — so this issue serves as the concrete removal trigger.

Activity

  1. added
    state:triage-needed
    on Jul 1, 2026
  2. TaylorMutch commented on Jul 1, 2026

    @TaylorMutch
    Contributor

    This looks like a duplicate of #1963

  3. removed
    state:triage-needed
    on Oct 1, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions