Files
deepagents/libs/code/deepagents_code/client/launch
Mason Daugherty d1f3afecdc fix(code): detach owned langgraph dev server from terminal (#4642)
Fixed dcode hanging when its terminal was suspended or closed while it
was running the built-in `langgraph dev` server.

When dcode starts its built-in `langgraph dev` server, closing or
suspending the terminal could stop the server unexpectedly and leave
dcode hanging during cleanup. This PR separates the server from the
terminal on macOS and Linux while keeping dcode responsible for shutting
it down.

---

## Before

dcode and its built-in server shared the same terminal session. Actions
such as suspending dcode with Ctrl+Z or closing its terminal could
therefore affect both processes at once. The server could stop before
dcode had a chance to clean it up, which could leave dcode stuck.

## After

The built-in server now runs in a separate session on macOS and Linux,
so terminal signals intended for dcode no longer stop the server at the
same time. When dcode exits, restarts the server, or encounters a
startup failure, it still shuts down the server and any child processes
it started.

This separation matters in both directions: the server should not be
accidentally stopped by the terminal, but it also must not be left
running after dcode is gone. Shutdown first gives the full server
process tree a chance to exit cleanly, then forces it to stop if
necessary. Safety checks ensure dcode never signals its own process
group. Windows behavior is unchanged.

---

Made by [Open
SWE](https://openswe.vercel.app/agents/0c752fd0-cfc3-0b00-87ba-fb1e67b483ce)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-07-13 01:46:55 -04:00
..