TECHNOLOGY

bb terminal tabs and dev-server process lifetime

In this article
THE QUICK TAKE

A closed bb terminal tab can leave its dev server running; identify the live process and worktree before interpreting a port conflict or stale preview.

Closing a terminal tab and stopping its process are different lifecycle events. The bb dev-server guide makes this distinction explicit: a terminal can keep running after its tab closes. This is useful for persistent previews, but it also means an old server can outlive the interface through which it was started.

The tab is a view of execution

A terminal tab displays a running session; it is not necessarily the lifetime owner of every process shown there. Suppose an agent starts a dev server and the developer later closes the side panel. The preview can remain available because the underlying session continues. The documented behavior helps explain that observation without assuming a hidden redeployment. Files, terminal output and network readiness describe different parts of the environment and should be checked against the process that is actually serving requests.

An old server can occupy a new task’s address

Now imagine another worktree starting an app with the same default port. Closing the first terminal tab did not free that port, so the second startup can fail. Alternatively, a browser bookmark may still open the older server and make new edits appear missing. The source-code changes can be correct while the observed application is stale. A useful diagnosis identifies the listening process and its worktree before modifying code in response to the misleading preview.

Distinguish quiet output from a stopped service

A dev server often produces no new terminal output while waiting for requests. Silence therefore does not establish completion or failure. Conversely, an old readiness message does not prove the service is still alive after a later error. Inspect the current session status and make a fresh request to the intended route. This is a general diagnostic approach rather than an undocumented bb process-control command. It combines lifecycle evidence with a direct observation of the application at the moment of the check.

Make the handoff describe what remains running

When leaving a preview ready for feedback, record its URL, worktree and relevant terminal session. The browser guide describes keeping the preview server available after browser checking. That handoff should make continued execution intentional and inspectable. If the environment is no longer needed, stopping it is a separate task from dismissing its tab. Clear ownership prevents the next worker from assuming that every invisible session ended or that every reachable development address belongs to the current branch.

Primary sources

Related engineering context: Choosing an AI development stack; Git state and undo.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles