Repository navigation
Description
🤖 Claude Opus 5.5 filing on behalf of willgosnold
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server (Kiro provider: packages/provider-kiro, packages/provider-acp)
Steps to reproduce
- Configure a remote OAuth MCP server for Kiro, for example Atlassian in
~/.kiro/settings/mcp.json:"atlassian": { "url": "https://mcp.atlassian.com/v2/mcp" }. - Sign in to it from
kiro-cli(/mcp, then re-authenticate).kiro-clinow lists the server as running, with its tools. - Start a Kiro thread in T3 Code on the same machine and ask it to use one of that server's tools.
Expected behavior
The Kiro session started by T3 reuses the stored sign-in, the same way kiro-cli does, and the MCP server's tools load. If there is no token, Kiro can open the browser to sign in.
Actual behavior
The MCP server never loads in Kiro sessions T3 starts. Kiro's mcp.log records Failed to connect … "error":"Unauthorized" at every session start, then shuts down its OAuth callback listener without opening a browser. A fresh kiro-cli session started a minute later connects to the same server without asking for sign-in.
Cause: Kiro's agent stores MCP OAuth credentials through the ACP client, not on its own. In @kiro/agent (dist/server/acp-server.js, kiro-cli 2.37.1), initialize reads:
secretStorage: clientCapabilities._meta.kiro.secretStorage === true,
openExternalUrl: clientCapabilities._meta.kiro.openExternalUrl === true,If secretStorage is true, the agent loads and saves the MCP OAuth client registration, tokens, PKCE verifier and discovery state through _kiro/secret/get, _kiro/secret/store and _kiro/secret/delete. If openExternalUrl is true, it opens the sign-in page through _kiro/openExternalUrl. Both default to false.
kiro-cli sets both, and answers the secret requests from ~/.kiro/secrets.json (mode 0600). T3 advertises only hooks (packages/provider-kiro/src/server/adapter.ts on main):
clientCapabilitiesMeta: { kiro: { hooks: { enabled: true, v2: true } } },and doesn't handle _kiro/secret/* or _kiro/openExternalUrl. A Kiro session started by T3 therefore has no way to read the stored token and no way to start a sign-in, so every OAuth MCP server fails with Unauthorized.
The Claude provider doesn't have this problem, because Claude Code keeps MCP OAuth tokens in its own ~/.claude/.credentials.json.
Possible fix: advertise _meta.kiro.secretStorage and _meta.kiro.openExternalUrl in the Kiro adapter, and handle the four requests. Backing them with ~/.kiro/secrets.json, as kiro-cli does, would also reuse existing kiro-cli sign-ins. I haven't built or tested this.
Impact
Major degradation or frequent failure. No OAuth-based MCP server can be used from Kiro threads in T3. Stdio MCP servers and the T3 MCP server are unaffected.
Version or commit
t3 v0.1.7 (WSL runtime). Source references from main @ 9e85538.
Environment
Windows desktop app with WSL2 runtime (Ubuntu 22.04.5, kernel 5.15.167.4-microsoft-standard-WSL2). kiro-cli 2.37.1, started by T3 as kiro-cli acp --agent-engine=v3 --auth-method=cli. Model claude-opus-5.5.
Logs or stack traces
# Kiro agent log for each process: client name and whether "Client supports ACP secret storage" was logged
20261104T152250901 kiro-cli secretStorage=1 atlassian: Failed to connect -> user re-auth -> mcp.connect.ok, listTools.ok
20261104T153626864 kiro-cli secretStorage=1 atlassian: mcp.connect.ok, listTools.ok (no sign-in needed)
20261104T152429953 t3-code secretStorage=0 atlassian: Failed to connect (Unauthorized)
20261104T153547351 t3-code secretStorage=0 atlassian: Failed to connect (Unauthorized)
20261104T154040542 t3-code secretStorage=0 atlassian: Failed to connect (Unauthorized)
# mcp.log, T3-started Kiro session
[MCP OAuth] Starting redirect server in case the server requires OAuth...
[MCP OAuth] Redirect server started on http://localhost:41509/oauth/callback
mcp.connect.error serverName=atlassian
Failed to connect serverName=atlassian error=Unauthorized
[MCP OAuth] Stopping redirect serverWorkaround
Use the Claude provider for threads that need OAuth MCP servers, or use kiro-cli directly.
Activity
willgosnold commentedon Nov 4, 2026
Follow-up from a
t3 triagesession on the same machine (T3 Code 0.1.7, desktop on Windows with WSL2 runtime, kiro-cli 2.37.1).The proposed fix works. I started
kiro-cli acp --agent-engine=v3 --auth-method=clifrom a minimal ACP client and changed only two things:initializesendsclientCapabilities: { _meta: { kiro: { secretStorage: true } } }_kiro/secret/getfrom~/.kiro/secrets.jsonThe agent asked for
kiro.mcp.<hash>.tokens, got the tokenkiro-clihad stored, and the Atlassian server connected:Without the capability, the same command fails with
Unauthorizedon every start and registers a new OAuth client each time. The storage key issha256(lowercased url + "|" + sorted headers), so a T3 handler backed by~/.kiro/secrets.jsonwould reuse existingkiro-clisign-ins as they are.A second gap: T3 drops Kiro's auth-needed signal. When no token is available, the agent sends:
_kiro/mcp/statuswith{ status: "failed", authType: "oauth", failedAuthorization: true, authorizationUrl, errorMessage }session/update→session_info_updatewith_meta.kiro.displayError(errorType: "mcp_connection_error", "MCP server "atlassian" requires authorization…")T3 shows neither, so the thread fails silently. The agent also stops its OAuth redirect server right after the failure, so the
authorizationUrlcan't complete on its own. A full fix probably needssecretStorage(reuse stored tokens),openExternalUrl(start sign-in), and showing_kiro/mcp/statusfailures in the thread.No duplicates found. Not fixed on main (
adapter.tsstill sends onlyhooksinclientCapabilitiesMeta).Produced by Kiro (claude-opus-5.5) via the T3 Code triage playbook.
[-][Bug]: Kiro threads cannot use OAuth MCP servers because T3 does not advertise Kiro secretStorage/openExternalUrl[/-][+]Kiro threads cannot use OAuth MCP servers because T3 does not advertise Kiro secretStorage/openExternalUrl[/+]ChristopherPHolder commentedon Nov 12, 2026
Workaround until #31019 is merged: a stdio shim between T3 Code and
kiro-cli.Posting this in case someone wants to try it. It applies the fix described above from outside T3 Code, so OAuth MCP servers load in Kiro threads today.
The shim is a small Node script that T3 Code starts instead of
kiro-cli. It starts the realkiro-cliand relays the ACP traffic in both directions, with two changes:initialize, it addssecretStorage: trueandopenExternalUrl: truetoclientCapabilities._meta.kiro._kiro/secret/get,_kiro/secret/store,_kiro/secret/deleteand_kiro/openExternalUrlitself, using Kiro's own secrets file, so existingkiro-clisign-ins are reused. T3 Code never sees these requests.Everything else passes through unchanged. Tested on macOS with Kiro CLI 3.1.0. It should also work on Linux. It does not work on Windows as is.
Requirements
PATHthat T3 Code gives to the processes it startskiro-cli login)Setup
Create the script. Save the code from The script at the bottom of this file
as
~/.local/bin/kiro-acp-t3-shim.mjs, then make it executable:Point it at the real Kiro CLI. Run
which kiro-cli. The script assumes/opt/homebrew/bin/kiro-cli. If yours is somewhere else, change the default path on the linethat starts with
const REAL_BIN =. This must be the realkiro-cli, never the shim itself.Check that it passes through. This should print the same version as
kiro-cli --version:~/.local/bin/kiro-acp-t3-shim.mjs --versionSwitch T3 Code to it.
/Users/<you>/.local/bin/kiro-acp-t3-shim.mjs. Do not use~.start on the old one.
Start a new Kiro thread. MCP servers you already signed in to from the Kiro CLI or IDE load
from the stored tokens. For a server that needs a new sign-in, the sign-in page opens in your
default browser.
Check that it works
~/.kiro/logs/*/kiro.logcontains both of these lines:Client supports ACP secret storageClient supports ACP openExternalUrlIf something goes wrong
env: node: No such file or directorynode. Replace the first line of the script with the full path to Node, for example#!/opt/homebrew/bin/node(find it withwhich node).failed to start /opt/homebrew/bin/kiro-cliKIRO_SHIM_LOG=/some/path/shim.logto the Kiro provider's environment variables in T3 Code. The log holds method names, secret keys and server names, never token values. It is off by default.To undo everything, clear the Binary path (or set it back to
kiro-cli) and refresh theprovider.
Good to know
$KIRO_HOME/secrets.json, or~/.kiro/secrets.jsonwhenKIRO_HOMEis not set. That is the file the Kiro CLI uses, sosign-ins are shared between the two. The shim keeps it readable by you only (mode
0600).http:andhttps:URLs, and only when Kiro asks for a sign-in.a remote server.
#31019 adds stored-token support to T3 Code
itself. Once that ships, you need the shim only for signing in from inside T3 Code.
The script