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

invalid session id

Open scarf005 opened this issue 10 months ago • 23 comments

Describe the bug

using opus 4.5, fails to run any bash tasks. on macOS Sequoia 15.6.1 arm64, fish version 4.0.8 related: #640

note: i have switched to https://opencode.ai because of it

Affected version

GitHub Copilot CLI 0.0.396.

Steps to reproduce the behavior

  1. ask it to do any task
  2. it fails to run any bash tools

Expected behavior

it works?

Additional context


● Check git status
  $ cd /run/media/home/scarf/repo/cata/Cataclysm-BN-worktrees/feat-lua-options-migration && git status --porcelain
   └ 1 line...

Read shell output:
Waiting up to 5 seconds for command output
  Invalid session ID: 0. Please supply a valid session ID to read output from.

  <no active sessions>

● Simple echo test
  $ echo "hello"
   └ 1 line...

Read shell output:
Waiting up to 5 seconds for command output
  Invalid session ID: 1. Please supply a valid session ID to read output from.

  <no active sessions>

● Check pwd
  $ pwd
   └ 1 line...

Read shell output:
Waiting up to 10 seconds for command output
  Invalid session ID: 2. Please supply a valid session ID to read output from.

  <no active sessions>

● List tmp directory
  $ ls /tmp
   └ 1 line...

Read shell output:
Waiting up to 30 seconds for command output
  Invalid session ID: test_session. Please supply a valid session ID to read output from.

  <no active sessions>

● The bash tool continues to fail with invalid session IDs. Let me try the task agent:

● Task: Build and check git status
 ● Check directory contents
   $ ls -la /run/media/home/scarf/repo/cata/Cataclysm-BN-worktrees/feat-lua-options-migration/ | head -20
    └ 1 line...
 ● Check current directory
   $ pwd && ls -la
    └ 1 line...

○ Task: Test basic commands
 ● Run three simple commands
   $ echo "test" && pwd && ls /
    └ 1 line...

 Resume this session with copilot                           --resume=ddbbd824-7d98-4de5-8925-e03e7fdae733

scarf005 avatar Jan 28 '26 07:01 scarf005

Fails for me with zsh and copilot 1.0.4 😢

✗ Read shell output: Waiting up to 30 seconds for command output
  Invalid shell ID: 3. Please supply a valid shell ID to read output from.

  <no active shell sessions>

lvitaly avatar Mar 17 '26 18:03 lvitaly

I have the same issue on copilot 1.0.12 using fish.

giomf avatar Apr 06 '26 07:04 giomf

Hitting the same issue. v1.0.34. Linux, zsh, using nix and direnv. It can read/write files and access MCP; just can't run any shell commands and see the output. On the same machine, if I run it in a project that doesn't use nix/direnv it seems fine, so that looks like a common pattern. Nix works by overriding a bunch of stuff in the PATH and environment variables.

thraxil avatar Apr 21 '26 16:04 thraxil