pingdotgg / pingdotgg/t3code

[Bug]: Threads remain permanently Working when environment is unavailable

Open
#4,852 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Area

apps/web / thread lifecycle and environment connectivity

Summary

Threads from a permanently unavailable environment remain stuck in a perpetual Working state and cannot be stopped or deleted from the T3 Code UX.

Affected threads
  • 58db3ec1-2e33-4fc1-a093-b35b3432b852
  • 6ad83f79-573b-4192-bcc2-c3728f732616

These threads appear to be associated with the retired devbox-legion environment.

Steps to reproduce
  1. Open T3 Code with threads associated with an unavailable environment.
  2. Observe that the threads remain in Working indefinitely.
  3. Attempt to stop or delete either thread.
  4. T3 Code shows the toast:
devbox-legion is not connected.
Expected behavior

Threads associated with an environment that is permanently offline or deleted should be recoverable from the current T3 Code UX. Users should be able to:

  • Mark the thread as stopped/failed.
  • Delete the thread locally or through the control plane.
  • Remove it from the sidebar without reconnecting the original environment.
Actual behavior

The threads remain perpetually Working. Stop/delete actions attempt to contact the unavailable devbox-legion environment and fail with a connectivity toast.

The current local CLI also cannot resolve these orphaned thread records.

Impact

The threads permanently clutter the sidebar and make the project appear to have active work when no worker/environment exists.

Suggested fix

Add an orphan-thread recovery path that does not require the original environment:

  • Allow a force stop/delete operation from the control plane.
  • Treat a permanently unavailable environment as sufficient to mark active work as interrupted.
  • Make thread deletion independent of the environment’s filesystem or live connection.
  • Consider showing an explicit Orphaned / Environment unavailable state instead of Working.
Related issue

Related, but distinct from #4851, which covers deletion of an orphaned project. This issue concerns individual threads that remain stuck in Working when their environment is unavailable.

Contributor guide

Open the contributing guide

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 in apps/web's thread lifecycle and environment connectivity paths, then trace stop and delete actions through the control plane and local CLI. Done means threads tied to an unavailable environment can be stopped, deleted, or removed from the sidebar without reconnecting that environment, with an appropriate non-Working state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, cli, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.