Skip to content

Preserve parsed agent flags in the prompt suggestion and prompt route - #19452

Open
ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/3e2c4bab-2c3d-4fd1-82ff-1f580d275c48
Open

ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/3e2c4bab-2c3d-4fd1-82ff-1f580d275c48

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Running omarchy agent --agent amp hello amp in bin/omarchy-agent prints To pass a prompt: omarchy agent prompt "hello amp" with --agent amp dropped. Running that suggestion verbatim therefore launches the default agent, or with no default only asks you to choose one, instead of launching amp with the prompt.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Type omarchy agent --agent amp hello amp and press Enter.
  3. Read the printed To pass a prompt: line — it has no --agent amp.
  4. Type that suggestion exactly as printed, omarchy agent prompt "hello amp", and press Enter.
  5. With no default agent set, you only see Choose default agent with: omarchy default agent <name> and nothing launches.

More cases

Different default set

Before After
before after

--inline dropped

Before After
before after

omarchy agent prompt has no --agent passthrough

Before After
before after

Related

omarchy-agent now builds its "To pass a prompt" suggestion from the
flags it already consumed (--inline, --pick, --local/--local-model,
--prefer-local, and --agent) instead of dropping them, so running the
suggested command launches the requested agent and mode rather than the
default. omarchy-agent-prompt now parses and forwards those same flags
to omarchy-agent in any order before the prompt text, instead of
treating them as literal prompt text.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

The PR keeps parsed agent options in prompt suggestions and forwards those options through the prompt route.

  • Agent prompt commands keep launch options with the prompt.

Reviews (3) · Last reviewed commit: "Stop option parsing on -- in omarchy-age..." · Reviewed by Greptile

Comment thread bin/omarchy-agent Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the diff, surrounding agent launcher code, existing agent tests, and the review comments at 8dcf2cf. Codex (GPT-6; reasoning effort not exposed) classified this as a bug fix, but the second classifier, deepseek-v4p1-flash, returned no valid classification. Classification remains unsettled, so verification has stopped pending another classification pass. No tests ran, and no code or labels changed; no second code review was requested.

Comment thread bin/omarchy-agent-prompt Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the updated diff, agent launcher and prompt routing code, regression tests, and review threads at e3c0005. Codex (GPT-6; reasoning effort not exposed) classified this as a bug fix, but the second classifier, deepseek-v4p1-flash, returned no valid classification. Classification remains unsettled, so worker verification has not started. No tests ran, no code or labels changed, and no second code review was requested. This is waiting on a successful classification pass.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 20, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at e3c0005 by Claude Fable 5.2, with a second opinion from Opus 5.5 (High) and muse-wonder (via pi, thinking high). Classified bug.

The bug is real and this fixes it. On a worker running quattro (b20d787), omarchy agent --agent amp hello amp prints To pass a prompt: omarchy agent prompt "hello amp", and pasting a flagged form such as omarchy agent prompt --inline --agent "codex" "hello amp" sends the flags to the default agent as prompt text. On this head the suggestion keeps --agent "amp", and the pasted command launches the named agent with only the prompt. The new assertions in test/shell.d/default-agent-test.sh fail with either bin/omarchy-agent or bin/omarchy-agent-prompt put back to quattro's copy, so they test the change. The full shell suite ran on the worker: 5 files failed, 4 of which fail the same way on quattro (ascii-test, branding-about-animation-test, provision-owner-keyboard-test, runtime-smoke-test) and one (remote-session-service-test) is a flake that passes on a rerun and that this diff does not touch.

Checked outside the diff: nothing in bin/, shell/, default/, config/, install/, migrations/ or applications/ calls the prompt route, so no existing caller has a prompt that could now be read as an option; omarchy-agent-crash and omarchy-agent-make pass --prompt to omarchy-agent directly. It merges cleanly with quattro and with #16944, whose mistyped-subcommand check is switched off for omarchy agent by its [--agent <id>] argument.

Two things noted, neither changed here. The suggestion is printed as "$*" inside double quotes, as it is on quattro, so a prompt containing ", $ or a backtick is not safe to paste back (omarchy agent --agent codex 'say "hi" $HOME' suggests ... "say "hi" $HOME"); the flags this adds are quoted the same way, which is harmless for agent and recipe ids. And --app-id= is parsed by omarchy-agent but neither carried into the suggestion nor accepted by the prompt route; only generated launchers pass it, and they never reach this message.

The second opinion found no defect and judged the size right; it agreed with the reproduction above rather than repeating it, and its independence is not guaranteed. Both of its models raised the two notes above, and both pointed out that the flag list now lives in omarchy-agent's parser, its suggestion builder and omarchy-agent-prompt's parser, so a flag added later has to be added in all three. That is the one thing left for the maintainer to weigh. Nothing is needed from the author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants