---
title: See your runtimes and where a command runs
description: Studio's /runtimes page lists every app process linked to it with weft/runtime — connected, restored after a restart, or gone — what Studio may do on its runs, each agent's manifest against its latest run, and the runtime-wide breakpoints; every replay names the runtime it runs in before Run.
url: https://weftgo.dev/docs/observe/playground/runtimes/
type: how-to
sources:
  - 'weft/studio/web/src/routes/runtimes.tsx (the page: sections by state, the facts, the what-Studio-may-do table, the agents table, the breakpoints, forget, ?runtime= and ?agent=)'
  - weft/studio/web/src/lib/runtimes.ts (runtimeState, STATE_WORDS, processGroups, processHead, overlapWords, countLine, debugScopeWords, mayDo, MAY_DO_HEAD, manifestMark, MANIFEST_WORDS, runManifestMark, RUN_MANIFEST_TITLE, breakpointsBy, BREAKPOINTS_SURFACE, BREAKPOINTS_HEAD, FORGET_WORDS, missingWords, RESOLVER_TITLE, NO_RUNTIMES)
  - weft/studio/web/src/lib/runs-in.ts (RUNS_IN, runtimeRefusal, runsInWhy, runsInDialled, runsInLine, runtimeLabel, registering)
  - weft/studio/web/src/components/studio/runs-in.tsx (the line, the select, the refusal, asked <Studio>)
  - 'weft/studio/web/src/components/studio/breakpoints.tsx (Breakpoints: the editor, surface runtimes; BreakpointsPointer)'
  - 'weft/studio/web/src/lib/settings.ts (BREAKPOINT_WORDS: every tool is a breakpoint, clear all)'
  - weft/studio/web/src/lib/honesty.ts (APP_CANCEL)
  - weft/studio/web/src/lib/drawer-spec.ts (BREAKPOINTS_MOVED)
  - 'weft/studio/runtime/runtime.go (RuntimeView: id, host, pid, cwd, studio_url, weft_version, service, env, connected_since, last_seen, connected, restored, sessions, breakpoints_own, agents, breakpoints, breakpoints_set_at, breakpoints_surface, breakpoints_by; AgentView: name, manifest_hash, model_provider, models, resolver, defaults, tools; ToolView: name, side_effects, allow, approval; BreakpointsBy* values; RuntimeServer.Forget, ErrConnected, ErrRuntimeBusy)'
  - 'weft/studio/debugger.go (serveForgetRuntime: 204, 404, 409 connected, 409 queued or accepted commands, 403 for a panel token; PUT breakpoints: surface)'
  - 'weft/studio/meta.go (metaManifest: source, agents, checked, stale, differs, latest, error; metaRuntimeLink: studio_url, in_process)'
  - 'weft/studio/manifest.go (runtimes, runtime_forget, target_check: off with the playground)'
  - 'weft/studio/README.md (After a Studio restart: the runtimes page, U20.1)'
  - 'weft/AGENTS.md (block 7: debug_scope; block 7a: breakpoints_set_at and breakpoints_surface)'
  - 'weft/CHANGELOG.md:109-112, 122, 136 (0.19.0: the /runtimes page, the Runs in line, manifest_check badges, manifest_check.latest and the runtimes fields and DELETE, the registration''s manifest_hash and studio_url, the per-variant Break on moved), 162 (CommandStore.DeleteRuntime); 19 (0.20.0: breakpoints set by a surface, kept across a restart), 29 (approval: true)'
---

# See your runtimes and where a command runs

Studio's **Runtimes** page, `/runtimes`, lists every app process that linked to it with [`runtime.Install`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Install): the ones connected now, the ones restored after a Studio restart and the ones that are gone. For each it says what Studio may do on the runs it starts and on the app's own turns, and why not; each agent's registered manifest against its latest run; and the breakpoints that park every run it starts. Every surface that starts a replay names the runtime it will run in, on a **Runs in** line, before Run.

Open it from the sidebar or the command palette, or from any **runtimes ⤢** link. The same data is `GET /api/runtimes`:

```sh
curl -s -H "Authorization: Bearer $WEFT_STUDIO_TOKEN" http://127.0.0.1:7331/api/runtimes | jq '.runtimes[] | {id, service, pid, connected, restored}'
```

## The runtimes page

The page groups runtimes by state, with a count line at the top ("2 connected · 1 restored after restart · 1 gone"):

![Studio's Runtimes page: the connected acme-app runtime with its process (host build-01, pid), cwd, weft version and dialled Studio, what Studio may do on the runs it starts and on the app's own turns (approve, steer, cancel, breakpoints), its acme-support agent with manifest and tools, and the breakpoint checkboxes](https://weftgo.dev/docs/_astro/studio-runtimes.light.B1ylviFT.webp)

*A connected runtime: its process, cwd and dialled Studio, what Studio may do on the runs it starts and on the app's own turns, its agent and breakpoints.*

| State | Means |
|---|---|
| connected | holds its command stream: experiments, approvals and breakpoints reach it |
| restored after restart | listed from Studio's store after a Studio restart, waiting for the app to reconnect; nothing reaches it until it does |
| gone | its stream is gone: the app stopped, or came back under another id; forget it once its commands resolve |

Each runtime is a card that tells it apart from the others: its id, service and env, its process (`host · pid`), its working directory, the weft version it was built with, when it connected and was last seen, and the Studio its link dialled. Only the server token, or a request on setup A's loopback, sees the working directory and the dialled URL; a panel token does not. Two connected links of one process (one host, pid and working directory) are drawn as one process, "one process · `<host>` · pid 2902 · 2 runtime links". When two links register the same agent the card says "registered by more than one link: researcher — an experiment runs on the newest connected one".

`?runtime=<id>` scrolls to a card. `?agent=<name>` explains an agent that no connected runtime registers: either its app is not linked (start it with `WEFT_ENV=dev` and `runtime.Install(…)`), or its `runtime.Agents(…)` does not include the agent, or registers it under another name. The refusals elsewhere in Studio link there.

With no runtime at all the page reads "No runtime has registered: an app links with runtime.Install(…) under WEFT_ENV=dev (or runtime.Enabled(true))." The page needs the playground: its capability is `runtimes`, off with `--no-playground`.

## What Studio may do

Each card has a table of the debugger's verbs, on the runs the runtime starts (playground runs and replays) and on the app's own turns of its service. Every "no" says why:

| Verb | On runs it starts | On the app's own turns |
|---|---|---|
| approve | yes while connected and the `playground` capability is on | needs `runtime.Sessions` installed |
| steer | the `steer` capability | needs `runtime.Sessions` installed |
| cancel | the `cancel` capability | never: "cancel is not supported on an app turn" |
| breakpoints | the `breakpoints` capability | needs an agent built with `runtime.Breakpoints()` |

Above the cards, the page explains `/api/meta`'s `debug_scope`. With `own+runtime`, the verbs act on runs a runtime starts and on the app's own turns of a service whose connected runtime registered `runtime.Sessions` (approve, steer) or an agent built with `runtime.Breakpoints()` (breakpoints). With `runtime-started runs`, the app's own turns are view-only: install [`runtime.Sessions`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Sessions) to approve and steer them ([Approve and steer your app's own turns](https://weftgo.dev/docs/observe/devtools/app-turns/)), and build an agent with [`runtime.Breakpoints()`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Breakpoints) to park its own runs.

## Manifest check

Each card lists its agents: the registered manifest's hash, the latest run's verdict, the models and the tools. A registration carries each agent's `manifest_hash`, the sha256 of its registered manifest, the same value as the `weft.manifest.hash` its runs record ([The manifest hash](https://weftgo.dev/docs/guides/manifest/#the-manifest-hash)). Studio compares it with the hash the agent's latest stored run carries, from `/api/meta`'s `manifest_check.latest`:

| Mark | Means |
|---|---|
| current | the latest run of this agent ran this manifest |
| stale | the latest run ran another manifest: the app runs another build than the one registered here (its title names the hash, "the latest run ran d2151022, not this manifest") |
| other version ran | the latest run ran another registered version of this agent |
| unchecked | no stored run of this agent carries a manifest hash |

The Agents page badges each agent card with the same mark, and the run header reads `manifest <hash> · current` or `· stale` from `manifest_check` alone. When a stale run's weft version differs from the registered build's, its title says the weft version changed and the manifest with it. Settings' Runtimes section is a summary, `manifest: checked N of M · stale K (…)` naming the stale agents, with `· differs D` when services hold an agent in different versions, and a link here. A model with `· resolver` holds a [`runtime.ModelResolver`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#ModelResolver): a model outside the list may be proposed, and the runtime decides before it acks.

## Runs in

Studio's replay drawer and playground, and the devtools panel's drawer, say before Run which runtime the command goes to:

```text
Runs in: rt_0396… weft-arena-dev (pid 2902, seen just now) · runtimes ⤢
```

The runtime is the connected registration of the agent first, then the newest seen; a registration that is not connected is never a target. When two connected runtimes register the agent, a select names them apart in the same words as the line, `rt_0396… weft-arena-dev (pid 2902, seen just now)`, and Studio adds "the newest connected of 2 registering researcher" while the first one is picked. The playground's own runtime select labels each runtime `<service> · <env> · pid N · N agents · rt_…`, so two links of one process, or two replicas of one service, read apart.

When no connected runtime registers the agent, the line is the refusal, and Run is held on the replay drawer, the playground, an experiment's cell re-runs and the source matrix:

```text
Runs in: ✗ no connected runtime registers researcher · runtimes ⤢
connected: weft-arena-dev (support, orders)
fix: runtime.Install(…, runtime.Agents(researcher)) under WEFT_ENV=dev
asked http://127.0.0.1:7331 · rt_0396… weft-arena-dev chose http://127.0.0.1:7347
```

The last line names the Studio this page asked and, in Studio, each connected runtime whose link dialled another (`rt_… <service> chose <url>`): a runtime connected to a different Studio is why this one cannot run the command.

A 503 on Run reads the same refusal and fix. The panel draws no Runs in line while no agent is picked.

## Breakpoints

The runtime-wide breakpoints live on the card, under "breakpoints (parked on every run this runtime starts)". Pick tools to park every call to them in every run the runtime starts; an agent built with `runtime.Breakpoints()` parks its own runs too ([Pause runs at breakpoints](https://weftgo.dev/docs/observe/playground/breakpoints/)). **clear all** removes the set. Picking every tool says "every tool is a breakpoint: every tool call of every run this runtime starts parks". The editor needs the `breakpoints` capability, a connected runtime and at least one tool; otherwise the set is shown read-only, with why.

Under a non-empty set, a line says who set it:

| `breakpoints_by` | The line |
|---|---|
| `studio` | "set 4m ago through this Studio's runtimes page", or "set 4m ago through the API" with the route named (`PUT /api/runtimes/{id}/breakpoints`) |
| `runtime` | set by an earlier Studio: the runtime's own registration carried it |
| `store` | restored from Studio's store after a restart, with when and through which surface when it was stored |

`PUT /api/runtimes/{id}/breakpoints` takes an optional `surface`, a short lowercase word; the page sends `runtimes`, and a PUT without one reads `api`. Studio keeps `breakpoints_set_at` and `breakpoints_surface` across a restart. The replay drawers and the playground carry no breakpoint setting of their own: they point here, "breakpoints for the whole runtime live on Runtimes", with the count in force.

## Forget a runtime

A runtime that is gone, or restored and never reconnected, has a **forget** button: it removes the runtime from the list and from Studio's store. Its commands and run routes stay as history, and an app that comes back registers anew. A connected runtime is never forgotten. Over the API:

```sh
curl -s -X DELETE -H "Authorization: Bearer $WEFT_STUDIO_TOKEN" http://127.0.0.1:7331/api/runtimes/rt_0396d1e2
```

| Answer | When |
|---|---|
| 204 | forgotten: its row and breakpoint set are removed from memory and the command store |
| 404 | an id nothing registered |
| 409 | it is connected (`runtime … is connected: only a runtime that is gone is forgotten`), or a queued or accepted command is addressed to it (`… still has queued or accepted commands: forget it once they resolve`) |
| 403 | any panel token: forgetting changes Studio's list for everyone |

The capability is `runtime_forget`, off with the playground. In Go, [`RuntimeServer.Forget`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/studio/runtime#RuntimeServer.Forget) does the same and returns `ErrConnected` or `ErrRuntimeBusy`; a third-party [`obsdb.CommandStore`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CommandStore) implements `DeleteRuntime` for it.

## The runtimes API

`GET /api/runtimes` answers `{"runtimes": [...]}`, one object per runtime. The fields the page reads:

| Field | Means |
|---|---|
| `id`, `host`, `pid`, `service`, `env` | the registration |
| `cwd`, `studio_url` | the working directory and the Studio the link dialled (credentials, query and fragment stripped; absent in-process); both absent to a panel token |
| `weft_version` | the weft the runtime was built with |
| `connected_since`, `last_seen` | UTC times |
| `connected`, `restored` | the state: `restored` marks one listed from the store after a Studio restart |
| `sessions`, `breakpoints_own` | it registered `runtime.Sessions`; one of its agents was built with `runtime.Breakpoints()` |
| `breakpoints`, `breakpoints_set_at`, `breakpoints_surface`, `breakpoints_by` | the runtime-wide set and where it came from |
| `agents[]` | `name`, `manifest_hash`, `model_provider`, `models`, `resolver`, `defaults` and `tools[]` (`name`, `side_effects`, `allow`, and `approval: true` for a `RequireApproval` tool) |

An agent's `manifest_hash` is the registration's, else Studio hashes the registered manifest, so an older runtime's agents carry one too. `model_provider` is the provider the agent's own model names in its manifest.

`GET /api/meta` adds what the page needs from Studio itself: `debug_scope`, `manifest_check` (`source`, `agents`, `checked`, `stale`, `differs`, `latest`) and `runtime_link`, this Studio process's own runtime link: `in_process` when it is `runtime.Local(srv)` or an HTTP link to this same server, else `studio_url`, the Studio it dialled. `runtime_link` is absent when no link is open, and to a panel token.

## Best practices & gotchas

- **Forget a runtime only after its commands resolve.** A queued or accepted command addressed to it keeps it (409), so a forget never strands a command. (Source: `studio/debugger.go` `serveForgetRuntime`)
- **Read "stale" as another build, not an error.** The latest run ran a manifest other than the registered one: the app you run now is not the build that recorded it. Regenerate `weft.json` when you keep one ([Describe your agents](https://weftgo.dev/docs/guides/manifest/)). (Source: `lib/runtimes.ts` `MANIFEST_WORDS`)
- **Restart the app, not Studio, to bring a restored runtime back.** A restored runtime receives nothing until its app reconnects and registers again. (Source: `lib/runtimes.ts` `STATE_WORDS`)
- **Name the agent in `runtime.Agents(…)` by the name its runs record.** A replay targets agents by name, and a refusal names the one no connected runtime registers. (Source: `lib/runs-in.ts` `RUNS_IN`, `lib/runtimes.ts` `missingWords`)

## See also

- [Connect your app to Studio's playground (weft/runtime)](https://weftgo.dev/docs/observe/playground/connect/)
- [Replay a run from any step, with edits](https://weftgo.dev/docs/observe/playground/replay/)
- [Pause runs at breakpoints, then steer or cancel them](https://weftgo.dev/docs/observe/playground/breakpoints/)
- [Operate Studio: logs, restarts and the runtime link](https://weftgo.dev/docs/production/studio-operations/)
- [Studio HTTP API](https://weftgo.dev/docs/reference/studio-api/)

Symbols used: [`runtime.Install`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Install) · [`runtime.Sessions`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Sessions) · [`runtime.Breakpoints`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#Breakpoints) · [`runtime.ModelResolver`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/runtime#ModelResolver) · [`RuntimeServer.Forget`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/studio/runtime#RuntimeServer.Forget) · [`obsdb.CommandStore`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CommandStore)
