aws / aws/amazon-q-developer-cli

Editor tool fails when editor (Pluma) is already running

Open
#2,045 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### 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

### Operating system

Linux 5.10.237-211.948.amzn2int.x86_64 - Amazon Linux 2

### Expected behaviour

The /editor command should work consistently whether the editor (Pluma) is already running or not. It should wait for the user to edit and save the temporary file before processing the content.

### Actual behaviour

I do not believe this is the same issue as #1208 or #1214.

I have Pluma defined as my EDITOR in Linux. When Pluma is already open and the /editor command is used, I get an immediate response from Amazon Q: "Empty content from editor, not submitting" without giving a chance to edit the temporary file. Even when saving content to the temporary file, it's ignored.

```
[chat-transcript]
1. When Pluma is already open and you use `/editor`, you immediately get "Empty content from editor, not submitting" without a chance to edit
2. When Pluma isn't already running and you use `/editor`, it works as expected

This sounds like a race condition or process handling issue with the Amazon Q CLI. The tool might be:
- Not waiting properly for the already-running Pluma instance to open the file
- Checking for content too quickly before you have a chance to edit
- Having issues with how Pluma handles multiple instances

Here are some potential workarounds:

1. **Close Pluma before using `/editor`**

### Steps to reproduce

Start pluma.
In the Q chat window, type /editor.
Notice the immediate output from Q: "Empty content from editor, not submitting".
Saving a prompt in the temporary file that was opened does not get sent back to Q chat.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.