You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kiro-cli v3: --no-interactive with a V2 agent exits 4 and only suggests /upgrade-agent, which a script cannot run #12110
When chat.enableAutoAgentUpgrade is not true (it is unset on a fresh install, and stays off if the user answers "Not now" to the first-run upgrade offer), a non-interactive run with a V2-format agent fails with exit code 4:
Error: agent "v2agent" needs upgrading for this agent engine, using "default" — run /upgrade-agent to convert v2agent.json
The message points to /upgrade-agent, an interactive slash command. A non-interactive command already exists (kiro-cli agent upgrade <DIR>, with --dry-run and --no-backup) and fixes the file, but the error does not mention it. Shared agent files (zips, repos) are often still V2, so CI jobs and scripts hit this first. The text using "default" also suggests the run continues with the default agent, but it exits.
Steps to Reproduce
kiro-cli settings chat.enableAutoAgentUpgrade false (or use a fresh install where the key is unset).
In an empty folder, create .kiro/agents/v2agent.json:
{"name":"v2agent","description":"v2 style","prompt":"You are a helper.","tools":["fs_read"],"allowedTools":["fs_read"],
"toolsSettings":{"fs_write":{"allowedPaths":["./out/**"]}}}
kiro-cli chat --agent v2agent --no-interactive "Reply with only OK."; echo $?. Observed: the error above, then 4.
Thanks for filing this detailed issue and the clear reproduction steps! You've highlighted a real usability gap where non-interactive/CI workflows hit a dead end when encountering V2 agents, since the error only points to an interactive command. A maintainer will take a look at this shortly — really appreciate you taking the time to document both the problem and the existing workaround so thoroughly! 🙌
When chat.enableAutoAgentUpgrade is not set (the default on a fresh install), running kiro-cli chat --no-interactive with a V2-format agent exits with code 4 and suggests running /upgrade-agent interactively. Since a script cannot run that slash command, there is no non-interactive path to handle V2 agents without manual intervention, making kiro-cli automation break silently on fresh installs.
Activity
github-actions commentedon Oct 25, 2026
Thanks for filing this detailed issue and the clear reproduction steps! You've highlighted a real usability gap where non-interactive/CI workflows hit a dead end when encountering V2 agents, since the error only points to an interactive command. A maintainer will take a look at this shortly — really appreciate you taking the time to document both the problem and the existing workaround so thoroughly! 🙌
AnilMaktala commentedon Oct 26, 2026
Thanks for raising this.
When
chat.enableAutoAgentUpgradeis not set (the default on a fresh install), runningkiro-cli chat --no-interactivewith a V2-format agent exits with code 4 and suggests running/upgrade-agentinteractively. Since a script cannot run that slash command, there is no non-interactive path to handle V2 agents without manual intervention, making kiro-cli automation break silently on fresh installs.Marking this as a bug to investigate further.