kiro-cli acp: let ACP/headless clients opt out of the ~6,700-token KIRO_CLI preamble
Summary
Every kiro-cli request is sent with origin: KIRO_CLI, and for that origin the service adds a fixed preamble of roughly 6,700 tokens to each request. That preamble includes instructions to act without asking and to identify as Kiro. An ACP client that brings its own system prompt, identity and rules about when to ask pays for the preamble on every turn, and works against it. kiro-cli has no setting, flag or environment variable that changes the origin or the preamble it selects.
Ask: a supported way for an ACP or headless client to request the shorter preamble. That could be a kiro-cli acp flag, an agent-config field, or a documented origin value for third-party clients. Any of these would do.
Environment
- kiro-cli 2.34.2 / KAS 2.34.2 (re-verified 2026-10-27). First measured on 2.32.0 / KAS 0.66.43; the numbers are stable across the two builds.
- macOS (arm64), agent engine v2, model Claude Opus 5.5.
Evidence
1. Floor per turn through kiro-cli acp. A custom agent with tools: [], no MCP servers, and inherited default resources disabled, sent a one-line prompt ("Reply with the single word OK."). Figures are the server's own contextUsagePercentage and meteringUsage from the _kiro.dev/metadata notification, median of 3 rounds on 2.34.2:
| Agent config | Context (1M window) | Credits |
|---|---|---|
| no tools, nothing inherited (floor) | 0.694% (~6,945 tokens) | 0.032 |
lean 6-tool set (fs_read, fs_write, execute_bash, grep, glob, web_fetch) |
1.083% (~10,828) | 0.047 |
tools: ["*"] |
2.890% (~28,903) | 0.107 |
The floor is the server preamble, plus kiro's small client-side agent prompt, plus the one-line prompt itself; subtracting it from the other rows isolates the tool schemas. The ~6,900-token floor is within noise of the 2.32.0 measurement, so it is stable across releases, not a one-off.
2. Same prompt, direct API, origin the only difference. The same one-line prompt measured directly against generateAssistantResponse with no kiro-cli, no tools and no system prompt (Opus 5.5), varying only the origin:
| origin | context used | credits |
|---|---|---|
KIRO_CLI |
0.671% (~6,700 tokens) | 0.0238 |
KIRO_WEB |
0.127% (~1,270 tokens) | 0.0165 |
A roughly constant ~5,400-token gap, independent of request size — 12 to 35% of credits per request across those runs. Tool calls and streaming behaved the same under both origins. This isolates the difference to the origin-selected preamble rather than anything the client sends.
3. No client-side control (re-checked on 2.34.2). kiro-cli acp --help exposes no origin/preamble/prompt flag; kiro-cli settings all has no origin/preamble key; and the shipped acp-server.js carries KIRO_WEB only as a string constant beside KIRO_CLI, with no KIRO_ORIGIN / originOverride / setOrigin selector anywhere in it. A systemPrompt request field is rejected with a 400. agentMode, x-amzn-kiro-agent-mode and agentTaskType did not change the preamble in testing.
Why it matters
- Cost. An agent loop pays the fixed preamble on every turn, which dominates a small request.
- Conflicting instructions. The preamble's "act rather than suggest" and "you are Kiro" sit above an ACP client's own rules and identity, so the client has to restate its rules in the user message to keep them.
Not asked for
- Not a way to drop safety content. The short preamble keeps identity, rules and content safety.
- Not a change for interactive
kiro-cli chat, where the full preamble is the product.
Repro
probes/acp-probe-p7-preamble.mjs runs the agent configurations above against a local, logged-in kiro-cli and prints the server-reported figures. Each configuration is one short billed turn per round:
node probes/acp-probe-p7-preamble.mjs --model claude-opus-5.5 --rounds 3 --only floor,lean,all-tools
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #10547: Allow users to override or disable the built-in system prompt (model persona & coding conventions) (82% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues concern the ability to override or disable Kiro's built-in system prompt/preamble. Issue #10547 requests overriding the hard-coded system prompt in the IDE, while the new issue requests a way for ACP/headless clients to opt out of the ~6,700-token KIRO_CLI preamble. Both share the same core problem: users cannot control the built-in system prompt that Kiro injects, leading to conflicting instructions and unnecessary token costs.
We are seeing the same thing, please fix.
Have a great day!
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
Thanks for raising this. ACP/headless clients that bring their own system prompts and identity currently pay for the ~6,700-token KIRO_CLI preamble on every request, and the preamble may actively conflict with custom agent instructions. An opt-out mechanism would make kiro-cli a cleaner ACP transport. Logging this as a feature request.