Repository navigation
fix(cli): Tell local run when the daemon stops under its session - #2348
Merged
Merged
Conversation
`local daemon stop` used to return `{"stopped": true}` even while a
`local run --session` was capturing. The run then retried its stream
with backoff for minutes, and the app kept sending telemetry to an
address nobody answered.
Stop now warns about the sessions that were still capturing and lists
them in a new `capturingSessions` field. A run or serve tailing a
daemon session treats a refused connection or a 404 after a dropped
stream as the end of that session (sessions live in daemon memory, so
it can't come back). It prints one warning and stops reconnecting. The
wrapped app keeps running, same as when a session is closed.
Co-Authored-By: Aditya Mathur <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…stop Co-Authored-By: Aditya Mathur <[email protected]>
`daemon restart` now prints the same warning as `daemon stop` when sessions were still capturing. The not-running `daemon stop` output also gets `capturingSessions: []`, so the field is always there. The run's warning now says the daemon stopped or restarted. Co-Authored-By: Aditya Mathur <[email protected]>
MathurAditya724
approved these changes
Nov 18, 2026
MathurAditya724
left a comment
Member
There was a problem hiding this comment.
Reviewed daemon-stop session reporting, transient versus terminal SSE failures, reconnect termination and wrapped-app lifetime. All 63 focused tests pass, and the real CLI daemon-stop regression passes with the app continuing to run. The configured-port restart E2E case also passes; GitHub CI passes. No blocking findings.
7 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you run
sentry local daemon stopwhile asentry local run --sessionis still capturing, the stop used to say{"stopped": true}and nothing else. The run kept retrying its stream for minutes (reconnecting in 1s… 2s… 16s…). Meanwhile the app kept sending telemetry to an address nobody answers, and SDKs only log that in debug mode.What changes:
daemon stopanddaemon restartwarn about sessions that were still capturing.daemon stopalso lists them in a newcapturingSessionsfield. The JSON only gains that field.local serve --session) whose stream drops, and then gets a refused connection or a 404, prints one warning and stops reconnecting. Sessions live in the daemon's memory, so once the daemon is gone they can't come back. Retrying can't help.local session closeor Stop capture in the viewer): the tail stops and the app goes on. Killing someone's dev server because the telemetry side went away felt worse than a clear warning.Before:
After:
via @MathurAditya724.
--
View Session [Sentry]