Skip to content

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

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

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

    No labels
    No labels

    Type

    No type

    Fields

    Language

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions