Skip to content

Architect commands with a quoted argument are split on whitespace and break at launch #1966

Backlog

Description

@waleedkadous

Problem

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.ts resolveCommand: an array-valued shell.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

  1. Keep an array-valued command as an array from config to spawn; never join and re-split it.
  2. 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.
  3. Look for the same whitespace split on the builder and shell command paths, and fix what is found.
  4. 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

  1. added
    area/tower
    on Nov 24, 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

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions