Skip to content

docs(kit): clarify how to restart terminal sessions - #648

Open
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:docs/kit-terminal-session-restart
Open

SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:docs/kit-terminal-session-restart

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Kit guide and skill show two calls in sequence to restart a Vite watcher. If a plugin author copies the example, terminate() closes the session’s output stream and restart() throws DF8206.

The revised example restarts the running watcher in the same session:

- await session.terminate()
  await session.restart()

The guide also shows how to run the command again after the process exits or the plugin stops it. Remove the closed session, then call startChildProcess() with the same command options and a fresh session ID.

Evidence

  • Before: Running the original example threw DF8206 on the second call.
  • After: The watcher restarted with a new PID in the same session and completed another build. The replacement example also produced build output after both natural exit and explicit termination.

Merge Danger

Door: Two-way. Reverting the commit restores the previous examples.
Blast Radius: Documentation.

@pkg-pr-new

pkg-pr-new Bot commented Nov 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@648

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@648

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@648

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@648

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@648

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@648

commit: 53ebcc3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant