Repository navigation
[Bug]: kiro-cli workflow dispatch exits 2, and Kiro doesn't expand dotted /speckit.* prompt names #4797
Agent suggestions
Public previewDescription
Bug Description
Workflow command and prompt steps with integration: kiro-cli don't work, in two layers. Both are checked against Kiro CLI 2.26.0, the current release.
-
Dispatch argv.
KiroCliIntegrationinheritsMarkdownIntegration.build_exec_args(), so a step runskiro-cli -p "/speckit.constitution", which Kiro rejects at argument parsing (exit 2). Kiro runs one prompt headless askiro-cli chat --no-interactive "<prompt>". In that mode it can't ask for tool approval: without--trust-all-toolsevery write is denied (tool permission approval is not supported in non-interactive mode. Use --trust-all-tools to auto-approve.) and the run still exits 0. Its--output-formattakestextorstream-json, notjson. -
Prompt names. Even with that argv, Kiro doesn't expand
/speckit.constitution. In headless mode it expands/namefrom.kiro/prompts/name.mdonly when the name has no dot:Input File in .kiro/prompts/Result /hellohello.mdthe prompt file runs /hello-worldhello-world.mdthe prompt file runs /hello.worldhello.world.md"That doesn't look like a recognized slash command." @name, the form in Kiro's prompt docs, isn't expanded in headless mode either. Spec Kit installs every Kiro prompt with a dot (speckit.plan.md), so no/speckit.*input reaches its prompt file.
Kiro CLI is one of the integrations listed as unverified in #2416.
Steps to Reproduce
specify init kproj --integration kiro-cli --script sh, with Kiro CLI 2.26.0 onPATHand logged in.- Add this workflow and run
specify workflow run kiro-wf.yml:
schema_version: "1.0"
workflow:
id: "kiro-constitution"
name: "Kiro constitution"
version: "1.0.0"
steps:
- id: constitution
command: speckit.constitution
integration: kiro-cli
- id: after
type: shell
run: echo "workflow continued past the constitution step"Expected Behavior
The step runs the speckit.constitution prompt through Kiro CLI and the workflow continues.
Actual Behavior
On main:
▸ [constitution] speckit.constitution …
error: unexpected argument '-p' found
Usage: kiro-cli [OPTIONS] [COMMAND]
For more information, try '--help'.
Status: failed
Error: Command exited with code 2
With the argv changed to kiro-cli chat --no-interactive --trust-all-tools "/speckit.constitution", the workflow completes, but only because Kiro's model worked around the input:
`/speckit.constitution` is not a built-in Kiro CLI slash command. It's not documented as a built-in command.
...
Found it — it's a prompt at `.kiro/prompts/speckit.constitution.md`. Let me read it.
Specify CLI Version
1.0.14.dev0 (main at 2c0a57a)
AI Agent
Kiro CLI
Operating System
Linux 6.17
Python Version
3.13.15
Error Logs
error: unexpected argument '-p' found
Additional Context
Proposed fix:
- Override
build_exec_args()to runkiro-cli chat --no-interactive --trust-all-tools [--model M] [--output-format stream-json] <prompt>. I have this ready with tests. - Install Kiro prompts under hyphenated names (
speckit-plan.md, invoked as/speckit-plan), the way Junie and Cline already format their command names.
The rename changes file names in existing projects, so I'd like to check the direction first: both in one PR, or the argv fix first? I'd also like to be assigned to this and open the PR, if that's okay with you.
Separately, --model is accepted, but in headless mode Kiro prints [warn] failed to set model '...': Method not found and falls back to its default model. That one is on Kiro's side.
AI Disclosure
Claude Code (Claude Opus 5.5, autonomous agent mode) was used to investigate Kiro CLI, run the reproductions and draft this issue.
Activity
fix(extensions): keep unwritten registered names for Kiro CLI and Qod…
fix(extensions): let a disabled extension's manifest claim its files
fix(extensions): check ownership on every Kiro CLI and Qoder cleanup …
fix(integrations): detect a pending Kiro rename from the prompts on disk
fix(integrations): ignore dotted Kiro prompts left after the rename
fix(integrations): skip Kiro prompts that share a file instead of rew…
fix(extensions): count unreadable owners at install, remove skipped Q…
fix(integrations): refuse the Kiro rename when prompt ownership is un…
fix(extensions): check the ownership marker before removal deletes a …
fix(extensions): keep unwritten registered names for Kiro CLI and Qod…
fix(extensions): let a disabled extension's manifest claim its files
fix(extensions): check ownership on every Kiro CLI and Qoder cleanup …
fix(integrations): detect a pending Kiro rename from the prompts on disk
fix(integrations): ignore dotted Kiro prompts left after the rename
fix(integrations): journal Kiro CLI prompt rewrites like Cline and Junie
fix(extensions): print the unowned prompt path with forward slashes
test(integrations): build the dotted Kiro fixture from the integratio…
fix(extensions): retire a dropped Kiro CLI or Qoder alias that shares…
fix(extensions): keep Kiro CLI and Qoder cleanup in the project's con…
fix(extensions): load installed integrations before checking every agent
fix(extensions): keep a prompt that is a symlink loop