From 0f36fa07adc8a23456fffd9d03f8fe1fd7033c40 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Tue, 18 Aug 2026 08:31:49 +0800 Subject: [PATCH] chore: repin bt-daemon to pick up the memory fix Moves the pin from 1ca65d4 to abd6756, which is braintrustdata/braintrust-coding-agent-plugins#23: "bound daemon memory so a long session cannot exhaust it". That fixes a daemon reaching 20 GB and crashing on a long session. Every Claude lifecycle event had been reading the whole transcript into memory and journaling it verbatim, so a session re-recorded its growing transcript every turn -- an 18 MB transcript produced a 1.6 GB journal, which replay then loaded and parsed entirely into memory. The daemon now mirrors transcript bytes once and references them, streams journal replay, retires idle sessions, and applies backpressure on session queues. Adds a hidden `--session-idle-timeout-secs` flag (default 300) to `bt trace daemon`. No source changes are needed here: bt only constructs bt-daemon's clap-parsed command schema, and the new field carries a default. Verified with `cargo check --locked --all-targets`, `cargo test auth::tests` (77 passed), and `cargo test trace` (40 passed). Clippy reports the same 14 pre-existing findings in bt's own code before and after the bump. Co-Authored-By: Claude Opus 5 (1M context) --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3af95ea7..3e2c7f79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -593,7 +593,7 @@ dependencies = [ [[package]] name = "bt-daemon" version = "0.1.0" -source = "git+https://github.com/braintrustdata/braintrust-coding-agent-plugins?rev=1ca65d4381acbed0610797c4f8825556b9b6cf10#1ca65d4381acbed0610797c4f8825556b9b6cf10" +source = "git+https://github.com/braintrustdata/braintrust-coding-agent-plugins?rev=abd6756ab36776e893c65d2edd96c5968d75e552#abd6756ab36776e893c65d2edd96c5968d75e552" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index e8cad8b3..065a0faf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ actix-web = "4.11.0" anyhow = "1.0.89" backoff = { version = "0.4.0", features = ["tokio"] } braintrust-sdk-rust = { git = "https://github.com/braintrustdata/braintrust-sdk-rust", rev = "43ba73edbf5220b57090e049feb094b60a92fcd4" } -bt-daemon = { git = "https://github.com/braintrustdata/braintrust-coding-agent-plugins", rev = "1ca65d4381acbed0610797c4f8825556b9b6cf10" } +bt-daemon = { git = "https://github.com/braintrustdata/braintrust-coding-agent-plugins", rev = "abd6756ab36776e893c65d2edd96c5968d75e552" } async-trait = "0.1" clap = { version = "4.5.20", features = ["derive", "env"] } crossterm = "0.28.1"