Centralize multi-profile authentication in the tracing daemon - #9
Merged
Merged
Conversation
Stephen Belanger (Qard)
requested review from
Abhijeet Prasad (AbhiPrasad) and
Andrew Kent (realark)
August 5, 2026 19:16
Abhijeet Prasad (AbhiPrasad)
approved these changes
Aug 6, 2026
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.
Summary
btdefault, then pin the canonical resolved profile for the lifetime of each sessionWhy
Coding agents can report concurrently through different Braintrust profiles. Setup or run selects the intended user/org/destination, but hook processes—including JavaScript plugins—must not read tokens, implement OAuth refresh, access keychains, or duplicate
btauth behavior.destinationis the sole trace target contract. Project logs, experiments, and exported parent spans are represented by the existing typed destination variants; there are no parallel project/parent/root fields.The embedding
btCLI must implementAuthProviderusing its existing non-interactive profile resolver. It should persist the selected non-secret route during setup, or supply an invocation-local route during run. This repository supplies the daemon-side contract and lifecycle; dependent agent PRs sendSessionRoutevalues over RPC.Validation
cargo test --manifest-path bt-daemon/Cargo.toml --all-features --lockedcargo clippy --manifest-path bt-daemon/Cargo.toml --all-targets --all-features --locked -- -D warningsgit diff --checkTests cover default and named profile selection, multiple profile/org routes in one daemon, canonical-profile refresh, immutable session routing, typed destinations, remediation status, and journal credential exclusion.
Release impact
No package is published, no marketplace repository is deployed, and no tag or GitHub release is created.