diff --git a/tools/wta/src/agent_pane_origin.rs b/tools/wta/src/agent_pane_origin.rs index 58de8422b..b099cdc92 100644 --- a/tools/wta/src/agent_pane_origin.rs +++ b/tools/wta/src/agent_pane_origin.rs @@ -96,7 +96,6 @@ pub fn append_default(session_id: &str, pane_session_id: Option<&str>) { tracing::warn!( target: "agent_pane_origin", session_id = %session_id, - path = %path.display(), error = %err, "failed to append origin record", ); diff --git a/tools/wta/src/app.rs b/tools/wta/src/app.rs index 8ba57796c..d1ca195fa 100644 --- a/tools/wta/src/app.rs +++ b/tools/wta/src/app.rs @@ -3131,7 +3131,6 @@ impl App { tracing::warn!( target: "agents_view", key = %key, - cwd = %raw_cwd_string, "dispatch_resume: stored cwd is no longer a valid directory; falling back to profile default", ); } @@ -3149,8 +3148,6 @@ impl App { argv.push("-d".to_string()); argv.push(cwd.clone()); } - let cwd_string = valid_cwd.clone().unwrap_or_default(); - // Optimistic state flip: bump Historical/Ended -> Idle so a rapid // second Enter on the same row sees a non-terminal status and // skips this branch (idempotent: ResumeDispatched no-ops on live @@ -3186,7 +3183,6 @@ impl App { cli = %cli_id, commandline = %commandline, launch_commandline = %launch_commandline, - cwd = %cwd_string, "dispatch_resume: new-tab scheduled", ); @@ -3331,7 +3327,6 @@ impl App { tracing::warn!( target: "agents_view", key = %key, - cwd = %raw_cwd_string, "dispatch_resume_in_agent_pane: stored cwd is no longer a valid directory; omitting from resume_in_new_agent_tab event", ); } @@ -3359,7 +3354,6 @@ impl App { tracing::info!( target: "agents_view", key = %s.key, - cwd = %cwd_string, "dispatch_resume_in_agent_pane: resume_in_new_agent_tab event published", ); @@ -5423,7 +5417,6 @@ impl App { target: "acp_load_session", tab_id, session_id, - cwd = ?cwd, "inbound load_session event from WT" ); if tab_id.is_empty() || session_id.is_empty() { diff --git a/tools/wta/src/coordinator.rs b/tools/wta/src/coordinator.rs index e20b4ca6a..f68d86329 100644 --- a/tools/wta/src/coordinator.rs +++ b/tools/wta/src/coordinator.rs @@ -424,11 +424,10 @@ async fn execute_choice( .unwrap_or(DelegatePromptDelivery::LaunchThenSend); let target_label = open_target_label(target); coordinator_log(&format!( - "open_and_send begin target={} parent={:?} agent={:?} cwd={:?} title={:?} direction={:?} delivery_mode={} input_chars={}", + "open_and_send begin target={} parent={:?} agent={:?} title={:?} direction={:?} delivery_mode={} input_chars={}", target_label, parent, agent, - cwd, title, direction, delegate_prompt_delivery_label(delivery_mode), @@ -511,8 +510,8 @@ async fn execute_choice( } => { let target_label = open_target_label(target); coordinator_log(&format!( - "open begin target={} parent={:?} cwd={:?} title={:?} direction={:?}", - target_label, parent, cwd, title, direction + "open begin target={} parent={:?} title={:?} direction={:?}", + target_label, parent, title, direction )); let _ = event_tx.send(AppEvent::ExecutionInfo(format!( "Opening {}.", diff --git a/tools/wta/src/main.rs b/tools/wta/src/main.rs index 11920b67c..84b45865c 100644 --- a/tools/wta/src/main.rs +++ b/tools/wta/src/main.rs @@ -1617,7 +1617,7 @@ async fn run_delegate( cwd: Option<&str>, ) -> Result<()> { // Log the prompt length, not the text — the prompt is user content. - tracing::info!(prompt_chars = prompt.map(|p| p.chars().count()), agent = agent_cmd, cwd, "run_delegate started"); + tracing::info!(prompt_chars = prompt.map(|p| p.chars().count()), agent = agent_cmd, "run_delegate started"); tracing::trace!(target: "delegate.content", prompt = ?prompt, "run_delegate prompt"); let (debug_tx, _) = tokio::sync::mpsc::unbounded_channel::(); @@ -1718,8 +1718,8 @@ async fn delegate_with_context( // The commandline bakes in the user prompt (`-i ""`); keep it out // of the debug log and only emit it at trace. - tracing::debug!(cwd, "delegate_with_context: launching"); - tracing::trace!(target: "delegate.content", commandline, cwd, "delegate_with_context commandline"); + tracing::debug!("delegate_with_context: launching"); + tracing::trace!(target: "delegate.content", commandline, "delegate_with_context commandline"); shell_mgr .wt_create_tab(Some(&commandline), cwd, None) @@ -2567,7 +2567,6 @@ async fn run_acp_app( if v.is_none() { tracing::warn!( target: "acp_load_session", - cwd = %s, "--initial-load-cwd refers to a missing directory; dropping from load_session params", ); } @@ -2577,7 +2576,6 @@ async fn run_acp_app( target: "acp_load_session", session_id = sid, tab_id = %tab_id, - cwd = ?cwd, "queueing boot-time initial load_session via AppEvent::WtEvent" ); let mut params = serde_json::Map::new(); diff --git a/tools/wta/src/master/mod.rs b/tools/wta/src/master/mod.rs index 5b1606b5b..4743b87c1 100644 --- a/tools/wta/src/master/mod.rs +++ b/tools/wta/src/master/mod.rs @@ -46,6 +46,7 @@ use std::sync::{Arc, OnceLock, Weak}; /// helper sharing this master. const NOTIF_CHANNEL_CAPACITY: usize = 1024; const SESSION_NEW_TIMEOUT_SECS: u64 = 120; +const MASTER_PIPE_DISCOVERY_FILE: &str = "master-pipe.txt"; use acp::Agent as _; use acp::Client as _; @@ -493,7 +494,6 @@ impl acp::Client for MasterClient { op = "write_text_file", helper_id = ?helper_id, session_id = ?sid, - path = ?args.path, "forwarding fs/write_text_file to helper" ); forwarder.write_text_file(args).await @@ -511,7 +511,6 @@ impl acp::Client for MasterClient { op = "read_text_file", helper_id = ?helper_id, session_id = ?sid, - path = ?args.path, "forwarding fs/read_text_file to helper" ); forwarder.read_text_file(args).await @@ -532,14 +531,6 @@ impl acp::Client for MasterClient { args_len = args.args.len(), "forwarding terminal/create to helper" ); - // Command line can carry user/file content — trace only. - tracing::trace!( - target: "master.content", - session_id = ?sid, - command = %args.command, - args = ?args.args, - "create_terminal command" - ); forwarder.create_terminal(args).await } @@ -800,7 +791,6 @@ impl acp::Agent for HelperHandler { step = "helper→agent", op = "new_session", helper_id = ?self.helper_id, - cwd = ?args.cwd, mcp_servers = args.mcp_servers.len(), pane_session_id = ?wta_meta.pane_session_id, "forwarding new_session" @@ -1312,7 +1302,8 @@ impl MasterPipeDiscoveryGuard { if let Err(err) = std::fs::create_dir_all(parent) { tracing::warn!( target: "master", - path = %path.display(), + discovery_file = MASTER_PIPE_DISCOVERY_FILE, + pipe_name = %pipe_name, error = %err, "failed to create master pipe discovery directory" ); @@ -1325,14 +1316,15 @@ impl MasterPipeDiscoveryGuard { match std::fs::write(path, pipe_name) { Ok(()) => tracing::info!( target: "master", - path = %path.display(), + discovery_file = MASTER_PIPE_DISCOVERY_FILE, pipe_name = %pipe_name, "master pipe discovery file written" ), Err(err) => { tracing::warn!( target: "master", - path = %path.display(), + discovery_file = MASTER_PIPE_DISCOVERY_FILE, + pipe_name = %pipe_name, error = %err, "failed to write master pipe discovery file" ); @@ -1362,7 +1354,8 @@ impl Drop for MasterPipeDiscoveryGuard { if let Err(err) = std::fs::remove_file(path) { tracing::warn!( target: "master", - path = %path.display(), + discovery_file = MASTER_PIPE_DISCOVERY_FILE, + pipe_name = %self.pipe_name, error = %err, "failed to remove master pipe discovery file" ); @@ -2312,7 +2305,7 @@ where tracing::info!( target: "session_hook", session_id = %sid.0, - new_title = %disk_title, + title_len = disk_title.chars().count(), "upgraded synthetic title from on-disk session artefacts", ); } diff --git a/tools/wta/src/protocol/acp/client.rs b/tools/wta/src/protocol/acp/client.rs index 15e17a5d2..02c0e360f 100644 --- a/tools/wta/src/protocol/acp/client.rs +++ b/tools/wta/src/protocol/acp/client.rs @@ -929,13 +929,12 @@ fn truncate_for_prompt(text: &str, max_chars: usize) -> String { fn format_pane_context_summary(pane_context: Option<&PaneContext>) -> String { match pane_context { Some(context) => format!( - "pane_id={:?} tab_id={:?} window_id={:?} source_pane_id={:?} effective_source_pane_id={:?} cwd={:?}", + "pane_id={:?} tab_id={:?} window_id={:?} source_pane_id={:?} effective_source_pane_id={:?}", context.pane_id, context.tab_id, context.window_id, context.source_pane_id, context.effective_source_pane_id(), - context.cwd ), None => "none".to_string(), } @@ -3331,7 +3330,6 @@ async fn run_inner( let cwd = active_pane_cwd .clone() .unwrap_or_else(|| std::env::current_dir().unwrap_or_default()); - startup_probe.log(&format!("Using session cwd={}", cwd.display())); let session_future = conn.new_session(acp::NewSessionRequest::new(cwd)); let session = tokio::time::timeout(std::time::Duration::from_secs(15), session_future) .await