Embed the coding-agent tracing daemon - #287
Open
Stephen Belanger (Qard) wants to merge 5 commits into
Open
Conversation
Contributor
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
Signed-off-by: Stephen Belanger <stephen.belanger@braintrustdata.com>
Signed-off-by: Stephen Belanger <stephen.belanger@braintrustdata.com>
Stephen Belanger (Qard)
force-pushed
the
agent/bt-daemon-integration
branch
from
July 30, 2026 13:55
39bbed4 to
6780c1d
Compare
Add bt agents setup codex and bt agents setup claude. The commands use each agent's plugin manager to install the currently published Braintrust tracing plugin without configuring the unreleased embedded daemon. Signed-off-by: Stephen Belanger <stephen.belanger@braintrustdata.com>
Create the shared tracing settings file when missing and allow --project to select the trace project. Existing settings, including legacy authentication fields, are preserved unchanged so current published plugins continue to work. Signed-off-by: Stephen Belanger <stephen.belanger@braintrustdata.com>
Stephen Belanger (Qard)
force-pushed
the
agent/bt-daemon-integration
branch
from
July 30, 2026 15:14
3fd4543 to
9f346b6
Compare
Point bt at the daemon PR commit that restores src to main, keeping the existing published plugin runtimes independent from the daemon-capable CLI release. Signed-off-by: Stephen Belanger <stephen.belanger@braintrustdata.com>
Stephen Belanger (Qard)
force-pushed
the
agent/bt-daemon-integration
branch
from
July 30, 2026 15:24
9f346b6 to
3298cdf
Compare
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.
Dependencies
Depends on braintrustdata/braintrust-coding-agent-plugins#1, pinned at commit
3e019e47290318b1332c81311e64647b964c21b8.That daemon PR in turn depends on braintrustdata/braintrust-sdk-rust#86, pinned at commit
d33e806bf6ab9548d37355f6a5098a971ef150aa.The plugin source cutover is intentionally deferred to stacked braintrustdata/braintrust-coding-agent-plugins#3, which must land only after this daemon is available in a released
btCLI.Summary
This embeds the shared coding-agent tracing daemon in
btand exposes it as thebt agentscommand family.bt agents daemonruns the foreground service, whilehook,status, andreplayprovide the integration and diagnostic entry points. The plugin hook shims can therefore use the installedbtexecutable for daemon lifecycle and transport without shipping another runtime.bt agents setup codexandbt agents setup claudeuse the coding agents' own plugin managers to add the official Braintrust marketplaces and install the currently published tracing plugins. Setup also creates the shared tracing settings when needed, enables tracing, and accepts--projectfor routing. It performs a non-destructive merge: every other setting, including legacy authentication and backend fields needed by currently published plugins, is preserved unchanged. The published plugins can move authentication to the daemon after abtrelease containing it is available.The
bthost resolves its normal profile, OAuth, keychain, or API-key credentials for each hook invocation and passes the resulting token, backend URLs, organization, and project to the credential-passive daemon. Hook errors remain fail-open so tracing cannot break a Codex or Claude Code turn.The daemon is consumed from the exact Git commit of its migration PR rather than through a local path dependency. The integration is rebased on current
btmain and preserves the newer top-levelupdatecommand and command routing introduced there.CLI regression tests verify the
setup,daemon,hook,status, andreplaycommand surface, the hook options, the Codex and Claude plugin-manager invocations, disabled Claude plugin recovery, default and explicit project selection, and preservation of existing metadata and legacy authentication settings. The supersededbt daemonpath remains rejected.Validation
cargo fmt --checkcargo check --lockedcargo test --lockedcargo +1.92.0 clippy --locked --all-targets --all-features -- -D warningscargo test --locked --test cli agents_setup_trace-claude-code@braintrust-claude-pluginbtbinary:SessionStartandStopevents through the embedded hook/api/project/register,/version, and/logs3at a local mock Braintrust backendbraintrust.plugin.codexspan-origin metadata