aws / aws/amazon-q-developer-cli

Kiro CLI Agent 2.2.1 — deserialization failure on initialize response in PhpStorm 2026.1

Offen
#3,783 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

Linux 6.17.0-1017-oem - Ubuntu 24.04.4 LTS

### Expected behaviour

The IDE should successfully connect to Kiro CLI Agent and establish a working session.

### Actual behaviour

The connection is never established. The IDE's MCP client receives the initialize response but cannot deserialize it because the field names don't match any known MCP result type. The response is
dropped entirely and the server stays in "Starting" state permanently.

### Steps to reproduce

Steps to reproduce

1. Install Kiro CLI 2.2.1
2. In PhpStorm 2026.1, go to Settings → Tools → AI Assistant → MCP Servers
3. Add Kiro CLI as an MCP server with stdio transport:

{
"mcpServers": {
"kiro": {
"command": "kiro-cli",
"args": ["mcp"] // or acp I also tried diffrent arguments and comnands
}
}
}

4. Observe the server stays in "Starting" state and never connects

Error from PhpStorm logs:

2026-04-29 00:02:05,176 SEVERE - io.modelcontextprotocol.kotlin.sdk.shared.ReadBuffer
Deserialization failed for line: {"jsonrpc":"2.0","result":{"protocolVersion":1,
"agentCapabilities":{...},"authMethods":[],"agentInfo":{...}},"id":"..."}

kotlinx.serialization.SerializationException:
Cannot determine RequestResult type from JSON:
[protocolVersion, agentCapabilities, authMethods, agentInfo]

at io.modelcontextprotocol.kotlin.sdk.types.RequestResultPolymorphicSerializer
.selectDeserializer(serializers.kt:339)

Analysis

Kiro CLI returns a custom response shape that doesn't match the standard MCP InitializeResult:

┌──────────────────┬───────────────────┬───────────────────────┐
│ Field │ Kiro CLI (actual) │ MCP spec (expected) │
├──────────────────┼───────────────────┼───────────────────────┤
│ capabilities │ agentCapabilities │ capabilities │
├──────────────────┼───────────────────┼───────────────────────┤
│ server info │ agentInfo │ serverInfo │
├──────────────────┼───────────────────┼───────────────────────┤
│ protocol version │ 1 (integer) │ "2025-03-26" (string) │
├──────────────────┼───────────────────┼───────────────────────┤
│ extra fields │ authMethods │ not in spec │
└──────────────────┴───────────────────┴───────────────────────┘

Kiro CLI returns:

{
"jsonrpc": "2.0",
"id": "...",
"result": {
"protocolVersion": 1,
"agentCapabilities": { ... },
"authMethods": [],
"agentInfo": {
"name": "Kiro CLI Agent",
"title": "Kiro CLI Agent",
"version": "2.1.1"
}
}
}

MCP spec expects:

{
"jsonrpc": "2.0",
"id": "...",
"result": {
"protocolVersion": "2025-03-26",
"capabilities": { ... },
"serverInfo": {
"name": "Kiro CLI Agent",
"version": "2.1.1"
}
}
}

The RequestResultPolymorphicSerializer.selectDeserializer() cannot match the field set to any known result type, so deserialization fails and the message is dropped.

Suggested fix

Align the initialize response to the MCP spec:

- agentCapabilities → capabilities
- agentInfo → serverInfo
- protocolVersion: 1 → protocolVersion: "2025-03-26" (or applicable version string)
- Move authMethods and other Kiro-specific fields into an extension namespace or remove from the initialize response

### Environment

```yaml

[q-details]
version = "2.1.1"
hash = "1d2ba18834ea4e6a88312b0dc70b2014b703aa6e"
date = "2026-04-25T00:26:23.098938Z (4d ago)"
variant = "full"

[system-info]
chip = "Intel(R) Core(TM) Ultra 7 255H"
total-cores = 16
memory = "62.23 GB"

[system-info.os.linux]
kernel_version = "6.17.0-1017-oem"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 24.04.4 LTS"
version_id = "24.04"
version = "24.04.4 LTS (Noble Numbat)"

[environment]
cwd = "/home/USER"
cli-path = "/home/USER"
os = "Linux"
shell-path = "/usr/bin/bash"
shell-version = "5.2.21"
terminal = "Gnome Terminal"
install-method = "unknown"

[env-vars]
DISPLAY = ":1"
PATH = "/home/USER/.local/bin:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin"
QTERM_SESSION_ID = "fa7cb490524e4056b0a7f35470611af3"
QT_IM_MODULE = "ibus"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "2.1.1"
SHELL = "/bin/bash"
TERM = "xterm-256color"
XDG_CURRENT_DESKTOP = "ubuntu:GNOME"
XDG_SESSION_DESKTOP = "ubuntu"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere zunächst die Verbindung mit Kiro CLI 2.2.1 und PhpStorm 2026.1 mithilfe der bereitgestellten stdio MCP-Konfiguration und ermittle anschließend die Implementierung der MCP initialize-response in Kiro CLI. Vergleiche die Antwort mit den im Issue gezeigten MCP InitializeResult-Feldern; abgeschlossen ist die Aufgabe, wenn PhpStorm die Antwort deserialisiert und der Server den Zustand „Starting“ verlässt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
api, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.