Repository navigation
feat(agents): add Kiro CLI as an agent runtime - #250
Merged
Merged
Conversation
Kiro CLI joins the runtime menu: its own image, adapter, launch and auth
commands, and the usual runtime plumbing across the backend constants and the
frontend `AgentType` union. Sessions run on Kiro's current engine (`--v3`).
Four things needed measuring rather than reading, because the CLI is silent
about each of them.
**The credential is a SQLite database**, not a JSON document, so the adapter
captures the file whole and restores it byte for byte. Detecting that a login
finished needs care: the database exists from the CLI's first run and gains a
device-registration row the moment the code is displayed, so "the file exists"
would close the auth terminal while the user was still approving in a browser.
What appears only on success is the token payload, whose OAuth field names sit
in the file's bytes and do not vary with the login method — unlike the row's
key, which is named after it. The watcher grows a third mode for that,
`__contains__:<text>`, alongside `__present__` and JSON dotted keys.
**An MCP server on internal HTTP is dropped without a word.** V3 accepts a
plain-HTTP MCP server only on a loopback host ("host must be 127.0.0.1 or
localhost, got `web`", from the CLI's own source); ours is
`http://web:4002/action_mcp` locally and a cluster address in production. The
symptom is not an error but an empty tool list, which leaves an automatic
session unable to call `finish_session` and therefore unable to end. The agent
container now forwards a loopback port to that service — inert for every other
runtime — and the adapter rewrites the host it writes into mcp.json. An HTTPS
or already-loopback URL passes through untouched.
**The prompt only arrives in `--no-interactive`.** `chat` documents a
positional first question and every other runtime here is driven that way, but
the TUI ignores it on both engines, and neither bracketed paste nor literal
keystrokes reach its input. An automatic session launched interactively never
receives its task. Interactive sessions keep the TUI; they carry no prompt.
**Billing is in credits, and the CLI reports its own.** Its OpenTelemetry
export is redirectable, so it is pointed at the collector Claude Code already
reports into: `kiro_cli_credits_consumed` arrives per turn with the model
attached, priced by the account's overage rate. Two coarser fallbacks stay
behind it — the `usageSummary` activity in the MITM log, then the movement of
the account's credit counter. Turning the CLI's telemetry off is not an option:
measured, it takes the cost figures with it, and silencing it wins no privacy
because redirecting the export is what stops the vendor receiving it.
The model catalogue and the account's credit balance come from Kiro's V3
control plane (`management.<region>.kiro.dev`), whose bearer and profile ARN
live in two different tables of that SQLite database. `BaseAdapter` grows
`collect_credential_metadata`, a no-op for every other runtime, so the CLI can
be asked for the catalogue it will actually accept.
Research and as-built notes:
docs/planning-artifacts/research/technical-kiro-cli-as-a-platform-agent-runtime-research-2026-08-28.md
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
8 of 13 tasks
artempartos
pushed a commit
that referenced
this pull request
Nov 11, 2026
Figtree and Hanken Grotesk give way to one Inter variable font from Google Fonts, loaded through a shared partial with a metric-matched Arial fallback so the swap does not shift the layout. Hardcoded monospace stacks now read the --app-font-mono token. Emails hide the font link from Outlook for Windows, which otherwise drops the whole stack for Times New Roman. Refs task #250 Signed-off-by: Dmitry Vislov <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds AWS Kiro CLI as an agent runtime: its own image, adapter, launch and auth commands, and the usual plumbing across the backend constants and the frontend
AgentTypeunion. Sessions run on Kiro's current engine (--v3).Verified end to end against a live account: device-code login → credential captured → model picker populated → session runs on the chosen model → MCP tools available → the agent ends its own session → cost, model and logs recorded.
Four things the docs do not warn about
Each of these was found by measurement, and each is silent when it goes wrong.
The credential is a SQLite database, not a JSON document. It is captured whole and restored byte for byte. Detecting that a login finished takes care: the database exists from the CLI's first run and gains a device-registration row the moment the code is displayed, so "the file exists" would close the auth terminal while the user was still approving in their browser. What appears only on success is the token payload, whose OAuth field names sit in the file's bytes and do not vary with the login method — unlike the row's key, which is named after it (
kirocli:odic:tokenfor Builder ID,kirocli:social:tokenfor a social login). The container watcher grows a third mode for that,__contains__:<text>, alongside__present__and JSON dotted keys.access_token/refresh_tokenV3 drops a plain-HTTP MCP server that is not on loopback, without a word. The rule is in the CLI's own binary (
crates/agent/src/agent/mcp/mod.rs): "host must be 127.0.0.1 or localhost, gotweb". Our MCP endpoint is internal HTTP in every environment —http://web:4002/action_mcplocally,http://mcp.<namespace>.svc.cluster.local:4002/action_mcpin staging and production. The symptom is not an error but an empty tool list, which leaves an automatic session unable to callfinish_sessionand therefore unable to end. The agent container now forwards a loopback port to that service (the watcher'sMCP_FORWARD_PORT/MCP_FORWARD_TARGET, inert for every other runtime) and the adapter rewrites the host it writes intomcp.json. An HTTPS or already-loopback URL passes through untouched.The prompt only arrives in
--no-interactive.chatdocuments a positional first question and every other runtime here is driven that way, but the TUI ignores it on both engines, and neither bracketed paste nor literal keystrokes reach its input. An automatic session launched interactively never receives its task and sits atreadyuntil a watchdog closes it. Interactive sessions keep the TUI — they carry no prompt, so nothing is lost.Billing is in credits, and the CLI reports its own. Its OpenTelemetry export is redirectable, so it is pointed at the collector Claude Code already reports into:
kiro_cli_credits_consumedarrives per turn with the model attached, priced by the account's overage rate, and cost appears while the session is still running. Two coarser fallbacks sit behind it — theusageSummaryactivity in the MITM log, then the movement of the account's credit counter. Turning the CLI's telemetry off is not an option: measured, it takes the cost figures with it, and silencing it wins no privacy, because redirecting the export is exactly what stops the vendor receiving it.Also here
management.<region>.kiro.dev). The bearer and the profile ARN live in two different tables of that SQLite database, and the region comes from the profile rather than from the identity centre.BaseAdaptergrowscollect_credential_metadata, a no-op for every other runtime, so the CLI can be asked for the catalogue its own sessions will accept.Checks
make check_allis green exceptSchemaParityTest, which fails ondevelopas well:git diff origin/develop -- db/is empty and this branch adds no migrations, so both of that test's inputs are byte-identical todevelop. The cause is a Postgres version difference in how one CHECK constraint is rendered (ARRAY[…]::text[]vsARRAY['…'::character varying::text, …]), not anything in this change.Research and as-built notes:
docs/planning-artifacts/research/technical-kiro-cli-as-a-platform-agent-runtime-research-2026-08-28.md, whose Appendix A is a runtime-agnostic playbook for adding the next one.🤖 Generated with Claude Code