From 60f3b5eb9bf284a719f861d628caff88c1e7cc80 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Tue, 20 Oct 2026 05:39:24 +0200 Subject: [PATCH] feat(agent): the transcript on by default First landed flag-gated: the mechanics were unproven at coding-traffic scale and the view changes what the model sees past the budget. The claw then ran every surface on it and nothing fell over, the only user is the deployment's own, and the sessions most likely to hit the budget were the ones least likely to find a flag. Below the budget the decorator is a pass-through, so the default's only always-on cost is the zoom spec in the prompt. transcript: None is the off switch; rhema-code spells it --no-transcript, the claw's transcript: false now writes the resolved value so false still means off. Saved sessions view fine: the log stays complete and the view derives per request. The system preview names zoom too, so what is previewed is what turns send. --- crates/rhema-claw/src/config.rs | 7 +++---- crates/rhema-claw/src/handler.rs | 8 +++++--- crates/rhema-claw/src/jobs.rs | 12 +++++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/crates/rhema-claw/src/config.rs b/crates/rhema-claw/src/config.rs index 97844ad..407fc8d 100644 --- a/crates/rhema-claw/src/config.rs +++ b/crates/rhema-claw/src/config.rs @@ -280,10 +280,9 @@ pub struct ClawConfig { pub listen: Option, /// The bounded request view over the claw's sessions — past a byte /// budget, older messages summarize into lines the agent's `zoom` - /// tool can open. On when unset; `transcript: false` sends the - /// whole history every step, as the coding agent does by default. - /// The claw turns it on because its chats and coding jobs never end - /// by design: a stashed session only ever grows. + /// tool can open. On when unset, matching the coding agent's + /// default; `transcript: false` sends the whole history every + /// step. pub transcript: Option, /// Bearer token for the `/v1` routes. Unset means the surface is /// open on its interface; set it when the port is reachable from diff --git a/crates/rhema-claw/src/handler.rs b/crates/rhema-claw/src/handler.rs index 8962ed2..78554c9 100644 --- a/crates/rhema-claw/src/handler.rs +++ b/crates/rhema-claw/src/handler.rs @@ -234,9 +234,11 @@ impl ClawHandler { /// the view its history would ride whole on every step. fn agent_config(&self, model: &str, workspace: &Path) -> CodingAgentConfig { let mut config = CodingAgentConfig::new(model, workspace); - if self.transcript { - config.transcript = Some(rhema_transcript::TranscriptSettings::default()); - } + // Write the resolved value, not an override: the coding agent's + // own default is on now, and the config's `false` must win. + config.transcript = self + .transcript + .then(rhema_transcript::TranscriptSettings::default); config } diff --git a/crates/rhema-claw/src/jobs.rs b/crates/rhema-claw/src/jobs.rs index f351d86..48bf87a 100644 --- a/crates/rhema-claw/src/jobs.rs +++ b/crates/rhema-claw/src/jobs.rs @@ -200,11 +200,13 @@ impl CodingJobHandler { let (provider, model) = self.backends.current(); let mut config = CodingAgentConfig::new(model, &workspace); config.max_turn_steps = self.max_turn_steps; - if self.transcript { - // A job's stashed session carries across runs and only ever - // grows; the view is what keeps a repeat run's steps cheap. - config.transcript = Some(rhema_transcript::TranscriptSettings::default()); - } + // A job's stashed session carries across runs and only ever + // grows; the view is what keeps a repeat run's steps cheap. + // Write the resolved value, not an override: the coding agent's + // own default is on now, and the config's `false` must win. + config.transcript = self + .transcript + .then(rhema_transcript::TranscriptSettings::default); let stashed = self .store .session(&instance_name)