Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Error streaming response when sending casual message ("hi") – Cannot read properties of undefined (reading 'model')

Open AlienLost08 opened this issue 1 year ago • 8 comments

Before opening, please confirm:

Operating System

win32

Kiro Version

0.2.13

Bug Description

When sending a simple casual message like "hi" in a fresh empty project, the KiroAgent extension throws a streaming error. The frontend expects a model field in the response, but it is missing, causing an unhandled exception.

Error shown:

Error streaming response: Cannot read properties of undefined (reading 'model') Source: kiroAgent

📊 Severity

Type: Stability / UX Bug

Impact: Low (not a security vulnerability but causes denial of service for the chat stream).

Reproducibility: Always (100%)

🛠 Suggested Fix

Add null checks in frontend streaming handler:

const model = response?.model || "default-model";

Ensure backend always includes a "model" field in streamed responses.

💻 Environment

Kiro IDE Version: Public Preview (v0.1.0, built-in kiroAgent)

OS: Windows 10 64-bit

Project State: Fresh empty folder

Steps to Reproduce

🔄 Steps to Reproduce

Open Kiro IDE with a new empty folder.

Enable the kiroAgent extension.

Type "hi" in the chat panel.

Observe the error in the bottom-right corner.

Expected Behavior

✅ Expected Behavior

The agent should handle messages without crashing.

If the model field is missing, it should either return a fallback response or ignore the message gracefully.

❌ Actual Behavior

Streaming crashes with an error:

Cannot read properties of undefined (reading 'model')

No response is displayed.

Conversation ID

Image

Additional Context

No response

AlienLost08 avatar Oct 01 '25 10:10 AlienLost08

🐞 Bug Report – Missing command handlers in KiroAgent

Title: kiroAgent.updateCoachingStatus, kiroAgent.getAutonomyMode, and config/getSerializedProfileInfo commands not found

📌 Description

When running Kiro IDE with the kiroAgent extension enabled, the extension host console logs repeated errors for missing command handlers and unimplemented message types.

Errors include:

Error: command 'kiroAgent.updateCoachingStatus' not found Error: command 'kiroAgent.getAutonomyMode' not found Error: No handler for message type "config/getSerializedProfileInfo"

🔄 Steps to Reproduce

Open Kiro IDE with kiroAgent enabled.

Observe extension host console (workbench.desktop.main.js).

Errors appear automatically when webview attempts to call missing commands.

✅ Expected Behavior

All registered commands should have valid handlers.

Webview message types like config/getSerializedProfileInfo should be properly handled or stubbed out safely.

❌ Actual Behavior

Commands not found, leading to repeated console errors.

Features like coaching status and autonomy mode appear broken/incomplete.

📊 Severity

Type: Functional Bug / Incomplete Feature

Impact: Low (not a security vulnerability, but breaks extension features and spams error logs).

Reproducibility: Always

🛠 Suggested Fix

Register handlers for all commands defined in package.json (e.g., kiroAgent.updateCoachingStatus, kiroAgent.getAutonomyMode).

Implement or safely stub out config/getSerializedProfileInfo in the extension host.

Add error handling to suppress unimplemented calls.

AlienLost08 avatar Oct 01 '25 10:10 AlienLost08

Had same issue

JialieY avatar Oct 01 '25 21:10 JialieY

kiro devloper, please reply to this issue....

AlienLost08 avatar Oct 02 '25 15:10 AlienLost08

It's been 4 days, and it still hasn't been fixed. Please resolve this issue...

AlienLost08 avatar Oct 05 '25 09:10 AlienLost08

hey schoemme, can you plz check your discord dm I have sent you debug log zip file.

AlienLost08 avatar Oct 12 '25 10:10 AlienLost08

Thanks, got it. Our team is reviewing...

schoemme avatar Oct 20 '25 14:10 schoemme

When investigating the issue, I found the error was pointing to a specific file not being found in /home//.config/Kiro/User/globalStorage/kiro.kiroagent/65dd3991616f458185a25e3c51d4aa79/414d1636299d2b9e4ce7e17fb11f63e9

I tried to remove the files, edit the files, but the easiest solution was to simply close the session and start a new one. (Not the IDE)

I had 5 or 6 sessions open. I closed them all, created a new session and everything started working again.

jessetop avatar Nov 22 '25 00:11 jessetop

Just ran into the same error a couple of months later. Newest version. After half an hour successfully chating in a new project So definitely not fixed.

Braitenbug90 avatar Dec 13 '25 09:12 Braitenbug90