Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(web_chat): remove worktree isolation metadata from progress events

Steven Enamakel1f54763fb8bd
diff --git a/crates/openhuman-core/src/progress.rs b/crates/openhuman-core/src/progress.rs
index 9ed06a59a6..d1605f6b85 100644
--- a/crates/openhuman-core/src/progress.rs
+++ b/crates/openhuman-core/src/progress.rs
@@ -177,18 +177,6 @@ pub enum AgentProgress {
/// The sub-agent's full final assistant text. Trace exporters record
/// this (truncated + content-gated) as the subagent span's output.
output: String,
- /// Absolute path to the worker's isolated `git worktree` checkout,
- /// when it ran with `isolation = "worktree"` (#3376). `None` for
- /// non-isolated (read-only / shared-workspace) workers.
- worktree_path: Option<String>,
- /// Files (relative to the worktree root) the worker changed, snapshot
- /// from `git status` after the run. Empty for non-isolated workers or
- /// a clean worktree.
- changed_files: Vec<String>,
- /// Whether the worker's worktree had uncommitted changes after the
- /// run. A dirty worktree must not be auto-removed — surfaced so the UI
- /// can require an explicit user decision. `None` for non-isolated.
- dirty_status: Option<bool>,
/// Set when the sub-agent's own turn was stopped early (failure
/// breaker or iteration cap) and handed back as incomplete. The trace
/// collector closes the subagent span at `WARNING` with it. `None` for
diff --git a/crates/openhuman-core/src/web_chat/channel_event.rs b/crates/openhuman-core/src/web_chat/channel_event.rs
index fae67f1607..6a66d2866a 100644
--- a/crates/openhuman-core/src/web_chat/channel_event.rs
+++ b/crates/openhuman-core/src/web_chat/channel_event.rs
@@ -453,22 +453,6 @@ pub struct SubagentProgressDetail {
/// consistent agent labels across timeline, sub-mascots, and drawer.
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
- /// Absolute path to the worker's isolated `git worktree` checkout
- /// (on `subagent_completed`, when the worker ran with
- /// `isolation = "worktree"`). Drives the inline worktree row's
- /// open/diff/remove actions. `None` for non-isolated workers (#3376).
- #[serde(skip_serializing_if = "Option::is_none")]
- pub worktree_path: Option<String>,
- /// Files (relative to the worktree root) the worker changed, snapshot
- /// after the run (on `subagent_completed`). Absent for non-isolated
- /// workers and clean worktrees.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub changed_files: Option<Vec<String>>,
- /// Whether the worker's worktree had uncommitted changes after the run
- /// (on `subagent_completed`). A dirty worktree must not be auto-removed —
- /// the UI requires an explicit user decision. `None` for non-isolated.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub dirty_status: Option<bool>,
/// The parent turn's tool-call id that this sub-agent spawn is
/// attributed to (on `subagent_spawned`), mirroring
/// `AgentProgress::SubagentSpawned::parent_call_id`. Lets the UI
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index f6f63f689e..7f71b811bf 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -176,29 +176,6 @@ use wire_caps::{cap_wire_args, cap_wire_output};
mod ledger;
pub(super) use ledger::{ledger_append_event, ledger_upsert_agent_run, ledger_upsert_telemetry};
-/// Build the worktree-isolation slice of a `subagent_completed`
-/// [`SubagentProgressDetail`] (#3376). An empty `changed_files` collapses to
-/// `None` so the renderer omits an empty "changed files" list rather than
-/// showing "0 files"; a non-empty list is forwarded verbatim. `worktree_path`
-/// / `dirty_status` pass through (`None` for non-isolated workers). Split out
-/// so the empty/non-empty branch is unit-testable without a live DB + channel.
-fn subagent_worktree_detail(
- worktree_path: Option<String>,
- changed_files: Vec<String>,
- dirty_status: Option<bool>,
-) -> SubagentProgressDetail {
- SubagentProgressDetail {
- worktree_path,
- changed_files: if changed_files.is_empty() {
- None
- } else {
- Some(changed_files)
- },
- dirty_status,
- ..Default::default()
- }
-}
-
/// Trace user attribution for a turn whose stored user payload carries no identity
/// (headless / autonomous / freshly booted cores): read the on-disk
/// app-session profile and return the user's email (preferred) or backend
@@ -649,9 +626,6 @@ pub(crate) fn spawn_progress_bridge(
output_chars,
output,
usage,
- worktree_path,
- changed_files,
- dirty_status,
..
} => {
subagent_events::on_subagent_completed(
@@ -667,9 +641,6 @@ pub(crate) fn spawn_progress_bridge(
output_chars,
output,
usage,
- worktree_path,
- changed_files,
- dirty_status,
);
}
AgentProgress::SubagentFailed {
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge_subagent_events.rs b/crates/openhuman-core/src/web_chat/progress_bridge_subagent_events.rs
index 2a6fab8b35..05abc16e8a 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge_subagent_events.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge_subagent_events.rs
@@ -159,9 +159,6 @@ pub(super) fn on_subagent_completed(
output_chars: usize,
output: String,
usage: Option<crate::agent::subagent_host::SubagentUsage>,
- worktree_path: Option<String>,
- changed_files: Vec<String>,
- dirty_status: Option<bool>,
) {
let parent_call_id = subagent_parent_call_ids.remove(&task_id).flatten();
let capped_output = cap_wire_output(output);
@@ -207,9 +204,6 @@ pub(super) fn on_subagent_completed(
"elapsedMs": elapsed_ms,
"iterations": iterations,
"outputChars": output_chars,
- "worktreePath": worktree_path,
- "changedFiles": changed_files,
- "dirtyStatus": dirty_status,
"parentCallId": parent_call_id
}),
},
@@ -245,10 +239,7 @@ pub(super) fn on_subagent_completed(
cached_input_tokens: usage.as_ref().map(|u| u.cached_input_tokens),
// `None` also when the child's cost is unknown (never a guess).
cost_usd: usage.as_ref().and_then(|u| u.cost().usd()),
- // Worktree isolation metadata (#3376) — drives the inline
- // subagent worktree row's open/diff/remove actions. All
- // `None`/absent for non-isolated workers.
- ..subagent_worktree_detail(worktree_path, changed_files, dirty_status)
+ ..Default::default()
}),
..Default::default()
},