Repository navigation
Open
Description
What
Add Kiro CLI as a supported agent, alongside claude-code, codex and opencode.
Why
Kiro CLI supports headless runs, which is what gitbot needs to drive an agent:
kiro-cli chat --no-interactive "<prompt>"runs a turn without the interactive UI--output-format stream-jsongives machine-readable output (engine v2/v3)--list-models --format jsonlists available models--resume-id <id>and--resume(per directory) continue a session--agent <name>selects custom agentsKIRO_API_KEYsupports auth in automation
Users who work with Kiro could then run gitbot bots without switching agents.
Proposed mapping
| gitbot setting | Kiro equivalent |
|---|---|
| Detect install | command -v kiro-cli |
| Run a turn | kiro-cli chat --no-interactive --output-format stream-json |
| Model | CLI flag or agent config (confirmed during implementation), validated against --list-models --format json |
auto-approve |
--trust-all-tools |
plan |
--trust-tools=read,grep |
ask-permissions |
Not supported (same as Codex) |
| Tool fence | Marked as not enforced (same as Codex) |
| Multi-turn threads | --resume per working directory |
Proposed approach
Follow the existing Codex integration pattern:
planmaps to--trust-tools=read,grep, so only read-only tools are trusted.auto-approvemaps to--trust-all-tools.ask-permissionsisn't supported, same as Codex, because headless mode has no per-call approval.- The tool fence is marked as not enforced, same as Codex, until --trust-tools is ignored when --agent names a custom agent: every tool call asks for approval and fails in --no-interactive kirodotdev/Kiro#11594 is fixed.
- Multi-turn threads use
--resumeper working directory, switching to--resume-idonce Kiro exposes the session ID in headless mode (Expose the conversation's session ID in headless mode (--no-interactive) kirodotdev/Kiro#9066).
Limitations
- No per-call approval in headless mode. Tools must be trusted upfront.
- The tool fence is category-level only. Kiro can't express per-command patterns like
Bash(git diff *). - Open upstream issues that affect this:
- --trust-tools is ignored when --agent names a custom agent: every tool call asks for approval and fails in --no-interactive kirodotdev/Kiro#11594:
--trust-toolsis ignored when--agentis set - v3 engine: .kiro/hooks never load in 'kiro-cli chat --no-interactive' (client doesn't advertise hooks capability) kirodotdev/Kiro#11598: hooks don't load in
--no-interactive - Expose the conversation's session ID in headless mode (--no-interactive) kirodotdev/Kiro#9066: the session ID isn't exposed in headless mode
- --trust-tools is ignored when --agent names a custom agent: every tool call asks for approval and fails in --no-interactive kirodotdev/Kiro#11594:
Contribution
I'd like to work on this. I'll wait for a maintainer to confirm the approach before opening a PR.
Metadata
Metadata
Assignees
Labels
No labels
Activity