--- title: 'DF8203: Failed To Spawn PTY Session' description: 'Failed to spawn PTY session for "{command}": {reason}' --- ## Message > Failed to spawn PTY session for "`{command}`": `{reason}` ## Cause `ctx.terminals.startPtySession()` could not launch the requested command in a pseudo-terminal: for example the executable was not found, the working directory does not exist, or spawning was denied by the OS. ## Fix - Verify the `command` resolves on `PATH` (or pass an absolute path) and that `cwd` exists. - Check the accompanying `reason` for the underlying spawn error. ## Source - [`packages/hub/src/node/host-terminals.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/host-terminals.ts): `DevframeTerminalsHost.startPtySession()` throws this when an initial or restart `zigpty` spawn fails.