Hosted device tiles stay running after the client deletes their workspaces

Open
#5,404 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
ios, react-native, typescript
Domain
backend, mobile

Research direction

Start by tracing how the client's status builds hosted-device rows and how it reconciles session and build records; the issue names packages/server/src/frames.ts:156 as the source of the unknown-workspace preview error. Check the normal stop path and invariant 8's handling of unmounted volumes. Done when deleted workspaces no longer leave hosted sessions or builds shown as running, while unmounted volumes fail closed.

Written by the indexing model from the issue text.

Description

area: cli area: mobile area: server priority: P2 type: bug

Problem

The phone app's Devices screen for a Linux client machine shows four hosted iPhone tiles on its device-host Mac, three Running and one Building with a timer at 15435 minutes (about 10.7 days). Each tile's preview says <path>/apps/mobile is not a Stim workspace on this machine., and every one of those project directories has been deleted on the client. Expected: a hosted session whose workspace is gone ends, or at least stops showing as running, and a build that is no longer running does not keep counting.

Evidence

  • Client: Linux build/agent machine, stim 1.41.0-next.20261110020316.g4aacfa0 after today's update (the tiles predate it). Its stim status lists none of the four workspaces, and the project directories do not exist.
  • The tile text is the server's frames error (packages/server/src/frames.ts:156, unknown-workspace), so the client's server still lists hosted devices for workspaces it no longer knows.
  • Device host: ~/.stim/device-host/sessions/ holds 3 session directories and simctl list devices booted shows one booted simulator, fewer than the tiles.
  • The client's agents remove project directories directly, without stim stop or stim worktree remove.
  • Screenshot of the Devices screen: available on request (not attached because it names private projects).

Cause

Unknown. Not yet traced: which record the client's status builds these hosted-device rows from, and why a deleted workspace's hosted session and build state are never reconciled.

Fix idea

When the client's status meets a hosted session whose workspace root no longer exists (checked with realpath, failing closed for an unmounted volume per invariant 8), stop that session through the normal stop path, or at least drop it from status. A build record with no live build process should end instead of counting.

Dominant language
TypeScript
Stars
100
Forks
8
Avg merge
4h 24m
Merged PRs (30d)
971

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from appandflow/stim

All issues in appandflow/stim

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.