Skip to content

Command override silently disables the model, mode and task fields #93

Description

@astetic-dev

Problem

When a project has a command override, create_session takes a different branch:

let (program, args) = if !command.trim().is_empty() {
    parse_override(&command)?      // runs this program, no agent flags at all
} else {
    build_command(&agent, ...)     // --model / --permission-mode / task
};

Everything build_command would add is dropped: --model, the mode mapping (--permission-mode / --sandbox / --dangerously-skip-permissions) and the task. The UI gives no hint of this — the Model field, the Mode dropdown and the Task box stay fully editable and look like they apply.

Found while testing #92 with a real project:

{ "label": "Antigravity test", "agent": "agy", "model": "", "mode": "auto", "command": "agy" }

Typing a model into the launch form produced a process started as bare agy.EXE with no arguments. The launch looked successful, so the only symptom was the agent quietly running on its default model — and, because the mode is auto, without the auto-approve flag the user configured. This cost a full round of debugging before the override was spotted, and it will mislead anyone picking a model from the new suggestion list too, since that writes into the same field.

Fix

Make the override's reach visible rather than silent. In rough order of preference:

  1. When a command override is set, disable the Model/Mode/Task inputs in the launch form and the projects editor, with a short hint ("a command override runs this program as-is; agent flags do not apply").
  2. Or keep them editable but show a warning next to the override field listing what it disables.

Worth deciding separately: an override that names exactly the agent's own executable (agy, claude) is indistinguishable from no override at all, and is probably always a mistake — the editor could point that out.

Acceptance

  • With a command override set, it is visible in the UI that model/mode/task do not apply.
  • No behaviour change to launching itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions