aws / aws/aws-toolkit-visual-studio

amazon q generate output with '\n' and no '\r' , but request crash if the edit file contains no '\r'

Open
#591 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
135
Forks
37
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Since version 1.188.0.0, Amazon Q generates files using only '\n' as newline characters (no '\r').

When asking Amazon Q to generate a patch for such a file, the model seems to run indefinitely and never returns a result.

Manually patching the file and replacing '\n' with '\r\n' resolves the problem and Amazon Q is then able to generate patches normally.

**To Reproduce**
1. Generate a file using a prompt.
2. Ask Amazon Q to generate a patch for this file.
3. The AI (Claude Sonnet 4.6 in my case) appears to run indefinitely and never completes.

**Expected behavior**
Amazon Q should generate the patch normally regardless of newline format.

**Screenshots**

Image

[log_2026-03-19_11-12-05_9440.txt](https://github.com/user-attachments/files/26121387/log_2026-03-19_11-12-05_9440.txt)

**Toolkit Logs**

**Development System (please complete the following information):**
- Windows Version:
-

Image

- Visual Studio Version: VS 2026 Community 18.4.1 (same in older versions)
- AWS Toolkit for Visual Studio Version: 1.188.0.0

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by generating a file with LF-only newlines, requesting a patch, and comparing the behavior after converting it to CRLF. Start with the attached toolkit log and the Amazon Q patch-generation entry point; done means patch generation completes for files using either newline format.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.