You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loaded openshell-cli skill, traced the exec validation pipeline
Found reject_control_chars() in crates/openshell-server/src/grpc/validation.rs:72-84 blanket-rejects \n and \r in ALL command arguments
Found shell_escape() in crates/openshell-server/src/grpc/sandbox.rs:1456-1474 independently rejects newlines during command construction
No special handling exists for bash -c, sh -c, or python3 -c patterns where the argument IS a script
Confirmed the rejection is at the gRPC validation layer, so it affects all callers (CLI, Python SDK, direct gRPC)
Description
sandbox exec rejects any command argument containing a newline (\n) or carriage return (\r). This blocks multi-line scripts passed to bash -c or python3 -c, which is the natural way agents produce executable code.
What happens:
Error: × code: 'Client specified an invalid argument', message: "command argument 2
│ contains newline or carriage return characters"
What I expected: The script body passed to bash -c "..." should be accepted, since the user explicitly opted into shell interpretation.
We use sandbox exec to dispatch tasks from a lead AI agent via MCP. The agent sends multi-line scripts (Python, shell) as its natural output. Having to convert everything to single-line with semicolons is fragile and limits what agents can do.
Environment
OpenShell: v0.0.66
OS: macOS (Darwin 25.0.0, Apple Silicon)
Compute driver: Podman (rootless, podman-machine)
Logs
Error: × code: 'Client specified an invalid argument', message: "command argument 2
│ contains newline or carriage return characters"
Activity