---
title: "DF8204: Terminal Session Cannot Be Controlled"
description: "Terminal session \"{id}\" cannot be controlled (no lifecycle handle)"
canonical_url: "https://devfra.me/errors/df8204"
---
# DF8204: Terminal Session Cannot Be Controlled

> Terminal session "\{id}" cannot be controlled (no lifecycle handle)

## Message

> Terminal session "`{id}`" cannot be controlled (no lifecycle handle)

## Cause

`hub:terminals:terminate` or `hub:terminals:restart` was called for a session with no lifecycle handle. Sessions added with a bare `ctx.terminals.register()` are just a descriptor plus an output stream; only sessions spawned via `startChildProcess()` or `startPtySession()` own a process the hub can control.

## Fix

Spawn it via `ctx.terminals.startChildProcess()` or `startPtySession()`; sessions added with a bare `register()` expose no terminate/restart handle. A bare session's lifecycle is driven by whatever owns its process; `hub:terminals:remove` still drops it from the registry.

## Source

- [`packages/hub/src/node/rpc-builtins.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/rpc-builtins.ts): the `hub:terminals:terminate` / `hub:terminals:restart` handlers throw this when the resolved session has no `terminate` handle.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
