Description
nemoclaw <sb> exec -- bash -lc '<heredoc>' rejects any multi-line content with the error × status: InvalidArgument, message: "command argument 2 contains newline or carriage return characters". This blocks the natural workflow of passing a small bash script to exec via a heredoc.
Single-line commands work fine, and the semicolon-joined workaround bash -lc "echo line1; echo line2" also works (outputs both lines). So this is a usability gap rather than a functional outage — but the InvalidArgument error message itself does NOT mention either workaround, leaving users to guess.
Environment
Device: testnemoclaw 10.6.76.40 (Phase 5 scrub)
OS: Ubuntu 26.04 no-GPU CPU sandbox path
Architecture: x86_64
Node.js: v22.22.3
npm: 10.x
Docker: 29.x
OpenShell CLI: openshell 0.0.44
NemoClaw: v0.0.68
OpenClaw: current release (2026.5.27)
Steps to Reproduce
-
Onboard any sandbox (e.g. bug29test on 10.6.76.40, OpenClaw CPU path).
-
Try a heredoc via exec:
$ nemoclaw bug29test exec -- bash -lc 'cat <<EOF
line1
line2
EOF'
Observe: × status: InvalidArgument, message: "command argument 2 contains newline or carriage return characters".
-
Confirm a single-line form works:
$ nemoclaw bug29test exec -- bash -lc "echo single-line-test"
-
Confirm the semicolon workaround works:
$ nemoclaw bug29test exec -- bash -lc "echo line1; echo line2"
Both lines print correctly.
Expected Result
Either:
- (a)
nemoclaw <sb> exec -- bash -lc '<heredoc>' accepts multi-line content and forwards it verbatim to the sandbox bash, OR
- (b) the InvalidArgument error explicitly mentions the supported alternatives: "Multi-line commands are not supported via
exec --. Use bash -lc \"cmd1; cmd2\" or pipe into the sandbox shell instead."
The user-visible error message should also point at the right command position so the user can spot the offending newline.
Actual Result
$ nemoclaw bug29test exec -- bash -lc 'cat <<EOF
line1
line2
EOF'
× status: InvalidArgument,
message: "command argument 2 contains newline or carriage return characters"
No mention of the working alternatives (single-line, semicolon-joined, or piping via shell). Users have to figure out the workaround by themselves.
Logs
Verified on v0.0.68 (Phase 5 scrub addendum, 10.6.76.40). Semicolon
workaround verified working in same session:
$ nemoclaw bug29test exec -- bash -lc "echo line1; echo line2"
line1
line2
Not captured beyond the terminal output above.
NVB#6390354
Description
nemoclaw <sb> exec -- bash -lc '<heredoc>'rejects any multi-line content with the error× status: InvalidArgument, message: "command argument 2 contains newline or carriage return characters". This blocks the natural workflow of passing a small bash script toexecvia a heredoc.Single-line commands work fine, and the semicolon-joined workaround
bash -lc "echo line1; echo line2"also works (outputs both lines). So this is a usability gap rather than a functional outage — but the InvalidArgument error message itself does NOT mention either workaround, leaving users to guess.Environment
Steps to Reproduce
Onboard any sandbox (e.g.
bug29teston 10.6.76.40, OpenClaw CPU path).Try a heredoc via exec:
Observe:
× status: InvalidArgument, message: "command argument 2 contains newline or carriage return characters".Confirm a single-line form works:
Confirm the semicolon workaround works:
Both lines print correctly.
Expected Result
Either:
nemoclaw <sb> exec -- bash -lc '<heredoc>'accepts multi-line content and forwards it verbatim to the sandbox bash, ORexec --. Usebash -lc \"cmd1; cmd2\"or pipe into the sandbox shell instead."The user-visible error message should also point at the right command position so the user can spot the offending newline.
Actual Result
No mention of the working alternatives (single-line, semicolon-joined, or piping via shell). Users have to figure out the workaround by themselves.
Logs
NVB#6390354