Repository navigation
Description
Summary
On a computer (a workspace with computer use enabled), a window app that the agent launches as a detached background shell keeps the run open after the agent has given its final answer. waitForBackgroundTasks (internal/agent/loop/utils.go) counts the app as a pending background task and blocks the completion boundary until the app exits or a2a.task.agent_mode_max_wait_seconds (300 s) passes. A window app is meant to stay open, so the session looks stuck: clients such as the Desktop app show it as running the whole time.
Observed on v0.252.0 with the ghcr.io/inference-gateway/computer:0.252.0 image.
The scope of this bug is window apps on a computer only. Regular background shells (builds, servers, long scripts started with detached: true) must keep holding the run exactly as they do today.
Steps to Reproduce
- Start a session on a computer workspace (computer use enabled, headless GNOME session).
- Ask the agent to open a terminal window and run a command in it.
- The agent launches the window app with
Bashanddetached: true(in the observed run:gnome-terminal-server --app-id org.gnome.Terminal), drives the window with theComputertool and gives its final answer. - Watch the run after the final answer.
Expected Behavior
The run completes as soon as the agent has answered. A window app launched on the computer's display is not work the run is waiting on - it stays open for the user and for later turns. If it exits later, its completion note can start a new turn, as background notes already do.
Regular background shells are unchanged: the run still waits for them at the completion boundary.
Actual Behavior
The run stays open after the final answer. From the worker log of the observed session:
22:41:55 assistant gives its final answer
22:41:55 waiting for pending background tasks before completing running_jobs=1 max_wait_seconds=300
22:44:23 [Background Shell Completed: shell-d2d641e8] Duration: 2m40.723s (gnome-terminal-server exited)
22:44:42 Completing -> Idle
The session was held for about two and a half minutes with nothing left to do, and would have been held for the full 300 s if the window had stayed open.
Notes
- The CLI needs a way to tell a window app from a regular background shell. Possible signals: the session runs with computer use enabled and the detached process is a client of the computer's display, or an explicit marker on the
Bashcall. The choice is open. - Related, same session: the computer image has no UTF-8 locale, so
gnome-terminalfailed four times before the agent started the terminal server by hand. That is why the agent ended up with a long-lived detached server in the first place. Tracked in [BUG] gnome-terminal cannot start on the computer image - no UTF-8 locale #1786.
Activity
inference-gateway-releaser commentedon Nov 10, 2026
🎉 This issue has been resolved in version 0.253.0 🎉
The release is available on:
Your semantic-release bot 📦🚀