copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

[BUG] Bash execution environment hangs - all commands timeout

Open kapral18 opened this issue 2 months ago • 21 comments

All shell commands hang indefinitely and timeout regardless of complexity. Tested with simple commands like echo "Hello, world!" and brew info losslesscut. Commands do not execute or return output.

Environment: macOS 15.6.1 M1 Max, Copilot CLI (~v0.0.354~)0.0.358

Image

kapral18 avatar Nov 15 '25 23:11 kapral18

@kapral18 we made some major updates to the shell tool in v0.0.355. Would you mind upgrading to latest and seeing if that fixes your problem. Shell session management was one thing specifically that was improved.

EvanBoyle avatar Nov 15 '25 23:11 EvanBoyle

@kapral18 we made some major updates to the shell tool in v0.0.355. Would you mind upgrading to latest and seeing if that fixes your problem. Shell session management was one thing specifically that was improved.

@EvanBoyle I updated to latest

Image

kapral18 avatar Nov 16 '25 00:11 kapral18

@EvanBoyle same with hello world

Image

kapral18 avatar Nov 16 '25 00:11 kapral18

Ah, I see from your other screenshots that this is with haiku?

EvanBoyle avatar Nov 16 '25 03:11 EvanBoyle

@EvanBoyle nope, happens across all models.

Image

kapral18 avatar Nov 16 '25 10:11 kapral18

@RyanHecht maybe you have any ideas ? I would really appreciate being able to use copilot-cli, if you need any additional specific diagnostics data let me know

kapral18 avatar Nov 17 '25 20:11 kapral18

Same here on x86 linux (nixos). 354 still works, and all builds up to 358 are broken for me too

markus1189 avatar Nov 17 '25 20:11 markus1189

@tidy-dev any ideas?

kapral18 avatar Nov 18 '25 11:11 kapral18

Same here on WSL2 with 0.0.360. 0.0.354 works.

Foo-x avatar Nov 18 '25 11:11 Foo-x

I was on 0.0.354 when I opened the issue. So for me it didn't work even then. But im on amd mac

kapral18 avatar Nov 18 '25 13:11 kapral18

Thank you all for the reports. We have some tool instructions updates we can roll out that will hopefully help smooth this out.

EvanBoyle avatar Nov 18 '25 14:11 EvanBoyle

Still broken in 0.0.361

markus1189 avatar Nov 19 '25 09:11 markus1189

Still absolutely broken

Image

kapral18 avatar Nov 19 '25 11:11 kapral18

Hi @kapral18 - would you be able to do Ctrl+r on the repro and share a screenshot with the expanded output?

shibbas avatar Nov 20 '25 12:11 shibbas

@shibbas

Image

kapral18 avatar Nov 20 '25 12:11 kapral18

Thank you! We rolled out some tool instructions updates today if you want to try, but @dereklegenzoff is going to dig deeper here.

shibbas avatar Nov 21 '25 01:11 shibbas

Tool instructions will not fix this IMHO. There is a problem with the node process not being connected to the spawned bash's input/output and that's why they hang and nothing happens

markus1189 avatar Nov 21 '25 07:11 markus1189

Image

markus1189 avatar Nov 21 '25 07:11 markus1189

Yeah. Agreed. Didn't think the tool instructions would help here - they help for some models we observed hallucinating the read_bash session_id and smoothing out session reads with parallel tools. We would be digging in deeper here.

shibbas avatar Nov 22 '25 08:11 shibbas

I found the problem in my setup:

Copilot found a bash that did not have readline support, therefore non-interactive and that made it fail.

Background:

As I'm on nix, and was running everything in a nix shell, the bash was not the bashInteractive version, but a minimal version without readline support. Adding bashInteractive from nixpkgs fixed it for me 🎉

So if somebody else has the problem and wants to check if bash has readline:

ldd $(which bash) | grep readline
	libreadline.so.8 => /nix/store/wy4jk1cb5l00rlvjb1kgwbsxz5kggm8s-readline-8.3p1/lib/libreadline.so.8 (0x00007f94fe9d4000)
	libhistory.so.8 => /nix/store/wy4jk1cb5l00rlvjb1kgwbsxz5kggm8s-readline-8.3p1/lib/libhistory.so.8 (0x00007f94fe9c5000)

markus1189 avatar Nov 22 '25 14:11 markus1189

I found the problem in my setup:

Copilot found a bash that did not have readline support, therefore non-interactive and that made it fail.

Background:

As I'm on nix, and was running everything in a nix shell, the bash was not the bashInteractive version, but a minimal version without readline support. Adding bashInteractive from nixpkgs fixed it for me 🎉

So if somebody else has the problem and wants to check if bash has readline:

ldd $(which bash) | grep readline
	libreadline.so.8 => /nix/store/wy4jk1cb5l00rlvjb1kgwbsxz5kggm8s-readline-8.3p1/lib/libreadline.so.8 (0x00007f94fe9d4000)
	libhistory.so.8 => /nix/store/wy4jk1cb5l00rlvjb1kgwbsxz5kggm8s-readline-8.3p1/lib/libhistory.so.8 (0x00007f94fe9c5000)

that's a nix specific problem.

Other systems have full bash package with readline support. So the problem persists for me on Mac with both native and brew versions of bash.

kapral18 avatar Nov 25 '25 11:11 kapral18

@shibbas @dereklegenzoff @EvanBoyle any update on this?

kapral18 avatar Dec 02 '25 22:12 kapral18

I just tried latest version 0.0.369 and it's still the same

Image

kapral18 avatar Dec 14 '25 16:12 kapral18