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
{{ message }}
Repository navigation
Architect commands with a quoted argument are split on whitespace and break at launch #1966
An architect command with a quoted argument that contains a space does not survive launch. Tower splits the configured command on whitespace, so
claude --append-system-prompt "be brief"
is started with "be and brief" as two separate arguments, and the architect dies at once or starts with the wrong arguments. Plain words and flags work, which is what configs use today, so this has not bitten in normal use.
Where
packages/codev/src/agent-farm/servers/tower-instances.ts: architectCmd.split(/\s+/) in launchInstance (the main architect, line 578 on main at 77e2d8236) and in addArchitect (line 1117).
packages/codev/src/agent-farm/utils/config.tsresolveCommand: an array-valuedshell.architect is joined with spaces (its comment says "handling escaping"; it does none) and then split the same way, so writing the command as an array, the natural way to keep an argument whole, does not help.
Found by the Spec 1940 builder while writing a real-Tower end-to-end test (a test Tower with a quoted architect command died immediately). Not changed there: out of scope.
Ask
Keep an array-valued command as an array from config to spawn; never join and re-split it.
For a string-valued command, either parse it with shell quoting rules (one small, tested parser, shared) or run it through the shell as the builder launch path does. Pick one and say why.
Look for the same whitespace split on the builder and shell command paths, and fix what is found.
Tests: a string command with a quoted spaced argument, an array command with a spaced element, and today's plain commands unchanged (byte-identical argv).
Windows: quoting rules differ; say what the chosen approach does there and dispatch the Windows workflow.
Activity