Skip to content

[BUG] Closing /tasks during a run clears the run's status #1731

Closed

Description

@edenreich

Summary

Opening /tasks during a run and closing it again wipes the run's status from the chat. The agent keeps working, but nothing on screen says so and it looks like everything stopped. A message sent then goes into the queue with Message queued - agent is currently busy, which is the first sign the run was still going.

Steps to Reproduce

  1. Send a prompt whose reply takes a while, so the status reads Generating response....
  2. Type /tasks and press Enter while it streams.
  3. Press Esc to return to the chat.
  4. Type a message and press Enter.

Reproduced with tmux and the tokenless mock gateway, with a reply that streams slowly. It behaves the same with chat.agui_loopback on and off, and on main from before the loopback work.

Expected Behavior

The status is still there after returning, showing the spinner and the run's elapsed time.

Actual Behavior

The status line is empty after Esc and stays empty. The run itself is unaffected: the reply finishes and the queued message is answered.

Cause

The panels send tui.SetStatusEvent{Message: "", Spinner: false} when they open and close (internal/presentation/tui/app/chat.go, internal/presentation/tui/handlers/chat_shortcut_handler.go). Later chunks do not restore the status, since handleStatusUpdate in chatcompletion/runner.go only updates it when the chat status changes.

From reading the code, the other panels that send the same event should do this too: themes, tools, agents and others. Only /tasks was run.

Suggested fix

One guard in StatusView.Update covers every panel: ignore a blank SetStatusEvent while IsAgentBusy() is true. StatusView already holds the state manager. toolsCompletedStatus also sends a blank status when no chat session is open, so check that a direct tool run does not keep a stale status behind the guard. The live clock keeps the spinner moving, since it is not driven by the panel's messages.

Also seen

After Esc the autocomplete row /tasks command | Show background tasks and their history is still shown under an empty input.

Activity

  1. added
    bug
    on Nov 6, 2026
  2. added theissue type on Nov 6, 2026
  3. moved this from Todo to In progress in 2026on Nov 6, 2026
  4. moved this from In progress to QA in 2026on Nov 6, 2026
  5. inference-gateway-releaser commented on Nov 7, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.246.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  6. moved this from QA to Done in 2026on Nov 7, 2026
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

    bugreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions