Skip to content

[CLI]: Allow --headless and --dry-run to be used together #3114

@la14-1

Description

@la14-1

What would you like?

Currently spawn status --headless --dry-run (and likely other commands) rejects the combination with:

{"status":"error","error_code":"VALIDATION_ERROR","error_message":"--headless and --dry-run cannot be used together"}

These two flags should be allowed together. --dry-run previews what would happen, and --headless means no interactive prompts / machine-readable output. Combining them is a valid use case — e.g. a CI pipeline that wants a structured preview of what a command would do without actually executing it.

Current behavior

The validation at packages/cli/src/index.ts:1043 explicitly blocks the combination.

Desired behavior

Remove the mutual-exclusion check so both flags can be passed simultaneously. --dry-run should still skip execution, and --headless should still suppress interactive prompts / emit structured output.


Filed from Slack by SPA

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI feature or bugenhancementNew feature or requestsafe-to-workSecurity triage: safe for automated processingunder-reviewIssue is being reviewed by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions