You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2: starting a foreground server blocks the agent indefinitely #50278
If the agent starts Uvicorn in the foreground, the server starts successfully but the shell tool never returns while it is running. The agent is stuck waiting and cannot continue testing or fixing the app without intervention.
This is an indefinite block on a healthy server process, not a slow command. Recovery should not depend on the model remembering to request background execution.
In a project with a working ASGI app at app:app and Uvicorn installed, ask the agent to start the server and then check its HTTP response.
Have the shell tool run uvicorn app:app --host 127.0.0.1 --port 8000 in the foreground, without background: true.
Uvicorn starts and stays running. The shell tool keeps waiting, so the agent never gets to the HTTP check unless the server is stopped or the command is manually backgrounded.
Expected: the server can keep running while the agent continues its work.
changed the title [-]V2: foreground shell commands block the agent until they exit[/-][+]V2: starting a foreground server blocks the agent indefinitely[/+]on Sep 21, 2026
Thanks for the detailed report and for putting together #50276!
As far as I can tell from the v2 code, a foreground shell command blocking the agent is intended behaviour, not a bug. Foreground commands have a 2-minute default timeout, after which the process is killed and the model is told it timed out. The shell tool's description also tells the model to use background: true for dev servers, and a running command can be moved to the background by hand. So what you're describing is a request for the tool to move long-running foreground commands to the background automatically, so the agent doesn't depend on the model remembering to ask for it. Maintainers will consider it.
If you saw a foreground uvicorn run for well over 2 minutes without being stopped (and the model hadn't passed timeout: 0), that would be a separate bug. Please add the session's tool call input and logs here if so.
Activity
[-]V2: foreground shell commands block the agent until they exit[/-][+]V2: starting a foreground server blocks the agent indefinitely[/+]opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and for putting together #50276!
As far as I can tell from the v2 code, a foreground shell command blocking the agent is intended behaviour, not a bug. Foreground commands have a 2-minute default timeout, after which the process is killed and the model is told it timed out. The shell tool's description also tells the model to use
background: truefor dev servers, and a running command can be moved to the background by hand. So what you're describing is a request for the tool to move long-running foreground commands to the background automatically, so the agent doesn't depend on the model remembering to ask for it. Maintainers will consider it.If you saw a foreground
uvicornrun for well over 2 minutes without being stopped (and the model hadn't passedtimeout: 0), that would be a separate bug. Please add the session's tool call input and logs here if so.Related:
backgroundoption)