Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Design Document continues to fail being generated

Open brooksyott opened this issue 1 year ago • 6 comments

Before opening, please confirm:

Operating System

win32

Kiro Version

0.5.9

Bug Description

The requirements document was generated by Kiro, but the design document continues to fail with:

aborted. The agent has seen this error and will try a different approach to write the file if needed.

I've been trying for an hour to have Kiro fix the requirements doc and generate the design document, but it keeps failing

Steps to Reproduce

  1. Created a requirements spec
  2. Tried creating the design and it continously fails

Expected Behavior

Design document created

Conversation ID

c0cf6127-5be5-44e1-9825-090bc0a5d4de e43821fb-d749-47a7-b579-6cb8e79a1eae d02ee543-82c8-443e-b37d-47fc19c14080 17046130-6f4a-493a-bacd-ee40776acd64 97831c49-a103-4aba-ae02-361265bc6294

Additional Context

No response

brooksyott avatar Nov 08 '25 23:11 brooksyott

i've encountered this unable to write to files issue many times across the last few months. i have encountered it with all kinds of files, and the problem/solution has never been clear.

a few weeks ago, it happened, and i spent a good amount of time with Kiro attempting to solve it. it seemed we came up with a solution to use 'touch' when creating the file before writing to it--and this appeared to work! so we put the solution in a steering doc.

but tonight, i am having the exact same issue again--and now with writing to a new design.md spec. tried a dozen times, even had Kiro reference the solution in steering and it does not work now.

Kiro says this about the issue:

"The issue is that I keep calling fsWrite WITHOUT the actual text content parameter."

and

"The Problem: I keep calling fsWrite with only the path parameter and NO text parameter. That's why it fails every single time.

The Solution: I need to call fsWrite with BOTH parameters: path AND text (the actual content)."

but it still fails!

"aborted. The agent has seen this error and will try a different approach to write the file if needed."

how to solve this once and for all (it really slows down my development process, and seems to resolve without reason)

miquael avatar Nov 11 '25 04:11 miquael

meanwhile, Kiro created and wrote to a README-test.md in a different directory outside of .kiro/specs. and Kiro created and wrote to a README-test2.md in the same .kiro/specs/ directory where the design.md write is failing. so it seems the design.md is specifically failing (at least in this case).

this has been my experience before. some file will be created but Kiro won't be able to write to it. usually, in these cases, Kiro can write to other files or create and write to new files.

sometimes if i delete the file, it will then create it again and then succeed in writing to it.

but i've tried deleting the empty design.md and had Kiro recreate it and attempt to write to it many times--but keeps failing (even after restart, update, etc)

miquael avatar Nov 11 '25 05:11 miquael

It keeps happening to me, did anyone find a solution?

C00kieMonsta avatar Nov 27 '25 10:11 C00kieMonsta

I have found a way to 100% reliably reproduce this bug. Here are the step-by-step instructions to replicate the issue:

  1. Install the workflow skills repository: Install the following workflow skills: https://github.com/liuzhengdongfortest/CodeStable
  2. Generate a long document: Run the cs-feat-design skill command to draft a software requirements document. Please define a relatively complex requirement to ensure the generated output is as long as possible.
  3. Observe the error: At the final step of the process during the "write" operation, the Kiro model will consistently fail with the following error message:

"aborted. The agent has seen this error and will try a different approach to write the file if needed."

  1. Scope of the issue (Models): This error occurs across all Kiro models under this specific workflow.
  2. Scope of the issue (Products): This is not isolated to a single interface; other Kiro products, such as the Kiro CLI, exhibit the exact same behavior.

Root Cause Analysis & Insights: I have strong reasons to believe that there are no inherent issues with the Kiro IDE or the Kiro CLI itself. Instead, the bug likely resides on the Kiro model server-side.

Specifically, the server seems to have a defect when handling model calls for the write tool. When the text payload is exceptionally long, the server returns corrupted or malformed data, which subsequently causes a format error when the client-side model attempts to invoke the write tool.

sewall2025 avatar May 31 '26 02:05 sewall2025

Thanks for raising this.

Closing this as stale -- it was filed against an older Kiro version and hasn't had activity in several months. If you're still seeing this on the current version, please open a new issue with your Kiro version, OS, and reproduction steps. To update, download from kiro.dev.

AnilMaktala avatar Sep 15 '26 19:09 AnilMaktala

Reopening — a user posted 100% reliable reproduction steps for Design Document generation failure in May 2026. This wasn't stale.

AnilMaktala avatar Sep 15 '26 19:09 AnilMaktala