OpenBMB / OpenBMB/PilotDeck

Bug: Stop session can hang indefinitely in running state

Open
#300 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4k
Forks
453
Avg merge
12h 30m
Merged PRs (30d)
46

Description

Bug: Stop session can hang indefinitely in "running" state

Clicking Stop in PilotDeck can leave a session stuck on running for a long time even when the model is no longer calling. In my repro, the UI stayed stuck for ~30 minutes, and clicking Stop again did not clear it.

What I observed

  • The stop action reaches the UI and sends abort-session.
  • The chat turn aborts, but the active turn/session state can remain in-flight.
  • The UI continues to show running even when there are no model calls.
  • This seems especially likely when a long-running tool/process is involved, for example a dev-server style command such as env && pnpm tauri dev.

Likely cause

The abort path appears to wait for turn cleanup to fully finish before returning. If a tool/process does not exit promptly on abort, cleanup never completes and the session stays marked as running.

There may also be a related state split between chat-session abort and Always-On work-cycle state, which can keep parts of the UI looking active after the model turn is already done.

Screenshot

I have a screenshot from the repro in chat showing the session stuck in the running state while the model is not actively calling.

Environment

  • Repo: OpenBMB/PilotDeck
  • Active install path: /opt/pilotdeck
  • UI service: pilotdeck-ui.service
  • Gateway service: pilotdeck-gateway.service

Notes

I can provide exact session IDs and logs if helpful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the UI Stop action and its abort-session handling, then trace turn/session cleanup and the related Always-On work-cycle state. Confirm how a long-running tool or process affects abort completion; done means the session and UI leave running even when cleanup is delayed, without leaving Always-On state active incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
tauri, typescript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.