{{ message }}
Repository navigation
Commit b1f8861
fix(integrations): dispatch Amp via execute mode (#4581)
Fixes #4580.
`AmpIntegration` never overrode `build_exec_args()`, so it inherited
`MarkdownIntegration`'s generic `-p <prompt> --model <model>
--output-format json`. None of those flags exist in the Amp CLI, so every
workflow `command:`/`prompt:` step targeting Amp aborted at argument
parsing with `error: unknown option '-p'` before the agent ever ran.
Amp's non-interactive entry point is `-x/--execute`, and its structured
output flag is `--stream-json` (valid only alongside `--execute`), so
this dispatches through those.
`model` is deliberately dropped rather than remapped: Amp exposes no
model-selection flag. `-m/--mode` takes an agent mode (low/medium/high/
ultra or a plugin mode), not a model identifier, so forwarding the
caller's model onto it would silently select the wrong thing.
Extra args from `SPECKIT_INTEGRATION_AMP_EXTRA_ARGS` are applied before
`--execute` because the flag takes the prompt as an optional inline
value; appending between the two would consume the prompt as the
operator's flag value.
Same fix shape as the one-off overrides for opencode (#2409) and goose
(#3781). Part of the audit in #2416.
Claude-Session: https://claude.ai/code/session_01X8QcZkxX87sSjsfUzBRm9h
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 730dcf5 commit b1f8861
2 files changed
Lines changed: 106 additions & 0 deletions

0 commit comments