Summary
agentty start currently collapses the original argv into a single space-joined string and the worker runs it via shell -lc.
Why this is a problem
- Quoted arguments lose their original boundaries.
- Empty arguments cannot be represented correctly.
- Commands containing spaces or literal quotes can be reinterpreted by the shell.
Impact
Common invocations like agentty start python3 -c "print("a b")" can behave differently from the user's original intent.
Suggested direction
- Keep the command as
file + args[] through the CLI/runtime boundary.
- Spawn the target command directly instead of re-parsing a reconstructed shell string.
- Add regression tests for quoted args, empty args, and literal quotes.
Relevant code
src/index.ts#parseStartOptions
src/worker.ts#spawn(shell, ["-lc", spec.command], ...)
Summary
agentty startcurrently collapses the original argv into a single space-joined string and the worker runs it viashell -lc.Why this is a problem
Impact
Common invocations like
agentty start python3 -c "print("a b")"can behave differently from the user's original intent.Suggested direction
file + args[]through the CLI/runtime boundary.Relevant code
src/index.ts#parseStartOptionssrc/worker.ts#spawn(shell, ["-lc", spec.command], ...)