Skip to content

build_root_task flattens multiple targets/constraints onto one line #682

Description

@sean-kim05

While reading strix/core/inputs.py I noticed build_root_task() assembles the root task prompt from a parts list that mixes section headers (e.g. "\n\nURLs:") with per-item bullets (e.g. "- https://a") as separate list elements, then joins them with a single space:

task = " ".join(parts)

Because the bullets are separate elements, every item after a header is concatenated with spaces rather than newlines. A scan with more than one target (or diff-scope constraints) therefore renders like this:

URLs: - https://a.example.com - https://b.example.com

instead of the intended list:

URLs:
- https://a.example.com
- https://b.example.com

Why this is a bug

  • The section headers already embed \n\n (e.g. "\n\nURLs:"), showing the output is meant to be a multi-line, bulleted list.
  • The sibling builder child_initial_input() in the same file joins its parts with newlines ("\n\n".join(parts)), confirming newline is the intended separator.
  • The flattened string is handed to the agent as its root task, so with multiple targets the agent receives a run-on line instead of a clean per-target list.

Impact

Any scan with >1 target, or with diff-scope repo constraints, produces a garbled target/constraints list in the root task prompt.

Suggested fix

Join parts with a newline ("\n".join(parts)), matching the sibling builder. Happy to open a PR with a regression test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions