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