anthropics / anthropics/claude-code

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

未关闭
#89,184 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area:agent-view area:tui bug has repro platform:linux regression
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
linux, python
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。