Skip to content

[BUG] Shell.run() holds the GIL while a command runs #119

Closed

Description

@shamil

strands-shell 0.3.3, Python 3.14.4, Ubuntu 26.04 x86_64, installed with pip.

While Shell.run() runs, no other Python thread runs. The asyncio event loop stops too.

import threading
import time

import strands_shell

ticks = 0


def tick() -> None:
    global ticks
    while True:
        ticks += 1
        time.sleep(0.001)


threading.Thread(target=tick, daemon=True).start()
time.sleep(0.1)
before = ticks
strands_shell.Shell().run("sleep 2")
print(ticks - before)

Expected: close to 2000.

Actual: 1.

Activity

  1. added
    bug
    python
    on Nov 2, 2026
  2. added theissue type on Nov 2, 2026
  3. added a commit that references this issue on Nov 7, 2026
    a330867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpython

    Type

    Fields

    Language

    Python

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions