anthropics / anthropics/claude-code

[BUG] No cofirmation on left arrow press before switching to agent view

Đang mở
#89,184 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:agent-view area:tui bug has repro platform:linux regression
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

According to https://github.com/anthropics/claude-code/issues/75899#issuecomment-5310814032

> pressing ← right after editing (e.g. you just backspaced the input empty) now asks to confirm with "Press ← again" instead of switching immediately

I don't see this behavior with 2.1.241 (Claude Code) on Ubuntu 24.04.

Pressing left arrow in an empty input area immediately enters the agent view.

See the video demonstration of the bug:

https://github.com/user-attachments/assets/013504ed-fa15-42bf-8dd9-731f4c8d1f80

### What Should Happen?

When left arrow is pressed, a confirmation dialog appears to prevent accidental entering of the agent view.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Restore default settings: `rm -f ~/.claude/settings.json`
2. Create a fresh directory: `mkdir /tmp/claude-agent && cd /tmp/claude-agent`
3. Lauch `claude`, trust the working dir, then press left arrow key

### Claude Model

Not sure / Multiple models

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.241 (Claude Code)

### Platform

Anthropic API

### Operating System

Ubuntu/Debian Linux

### Terminal/Shell

Xterm

### Additional Information

Despite https://github.com/anthropics/claude-code/issues/75899#issuecomment-5310814032 saying

> please reply if you still see either problem on 2.1.233+ and we'll reopen

reopening does not happen after the comment https://github.com/anthropics/claude-code/issues/75899#issuecomment-5388458845.

Therefore this issue is opened, and needs to collect at least 10 upvotes or be periodically commented on to prevent auto-closure, see https://github.com/anthropics/claude-code/issues/87647.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce the issue from a fresh directory using the documented Claude Code launch and left-arrow steps on Ubuntu/Debian Linux. Trace the terminal input handling for an empty input and verify that pressing left arrow shows the confirmation prompt before entering agent view.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
linux, python
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.