github / github/copilot-cli

Shell command completion never detected when running inside tmux (output appears, but command reported "still running" forever)

Open
#4,223 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:tools
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

When Copilot CLI runs inside a tmux session, shell tool commands execute and their output appears correctly, but the CLI never detects command completion. Even a trivial echo hello prints hello and then hangs indefinitely as "still running"; it must be manually stopped. Running the CLI outside tmux, the identical command completes immediately (exit code 0).

This is independent of tmux version and config. See matrix below.

What this is NOT

Not the unfocused-pane keystroke bug (#4213): output is delivered fine and this is not about input/enter. This is specifically completion/exit detection of shell tool commands.

Reproduction matrix
Condition Result
Inside tmux 2.7 hangs -> "still running" forever
Inside tmux 3.3a (escape-time 0, allow-passthrough on) hangs
Outside tmux echo hello -> completes, exit 0
Affected version

1.0.74-1 (also seen on prior versions starting from 1.0.70). Version 1.0.69 is unaffected

Steps to reproduce the behavior
  1. Start Copilot CLI inside a tmux pane.
  2. Have the agent run a shell command, e.g. echo hello.
  3. Output hello appears, but the command is reported "still running" indefinitely; only stop clears it.
  4. Exit tmux, repeat the same command. It completes normally with exit code 0.
Expected behavior

Shell command completion/exit should be detected the same inside and outside tmux.

Additional context
Environment
  • Copilot CLI: 1.0.74-1 (also seen on prior version)
  • OS: Linux
  • Shell: /bin/bash, TERM=xterm-256color
  • tmux: reproduced on 2.7 and 3.3a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue inside and outside tmux with echo hello, comparing the shell command completion and exit status. Trace the CLI's shell-command completion detection and identify why tmux differs; done means the command reports completion and exit code 0 in both environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, shell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.