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:
- 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").
- 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
Problem
When a project has a command override,
create_sessiontakes a different branch:Everything
build_commandwould 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.EXEwith no arguments. The launch looked successful, so the only symptom was the agent quietly running on its default model — and, because the mode isauto, 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:
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