Repository navigation
fix(pi): show the trace link once the first turn is delivered - #231
Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intoOct 27, 2026
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
CI passed on my fork at this PR's head ( |
Abhijeet Prasad (AbhiPrasad)
approved these changes
Oct 27, 2026
Abhijeet Prasad (AbhiPrasad)
merged commit Oct 27, 2026
c4115cc
into
braintrustdata:main
17 checks passed
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.
Pi refreshes the trace-link widget at
session_start, before the daemon has delivered anything for a new session, so the link never shows up for that session. The daemon uploads a turn afteragent_end, not during it: about a second later withflush_on_turn_end, and when its 30 second batch window closes withfire_and_forget.status.getreturns before that upload, so one refresh atagent_endalso misses it.After
agent_end, the extension now pollsstatus.getevery 2 seconds, for up to 40 seconds, until the current session reports a permalink. Polling stops once the link is shown, when the Pi session changes, atsession_shutdown, and at the deadline. Later turns do not poll again once the link is visible. The timer is unref'd, the existing 250 ms status client is reused, and the extension still never requests a flush.This depends on #230, which makes the daemon report
permalinkinstatus.get. Without it, the field staysnulland this change has no visible effect.Validation:
pnpm testinsrc/plugins/pi/content: 24 passed. The new polling test fails onmain.pnpm run checkandpnpm run buildinsrc/plugins/pi/content: pass.flush_on_turn_end, and about 30 seconds after withfire_and_forget. Before this change it did not appear for the new session.