Skip to main content

init_tracing

Function init_tracing 

Source
pub(crate) fn init_tracing()
Expand description

Initialize tracing to write to ~/.agentmux/logs/bashwrap-debug.log at INFO by default. Writing to a file instead of stderr means:

  1. Diagnostics survive bash’s stdio capture — Claude’s tool_result stderr field is empty for successful commands, so anything we write to stderr is lost to us as developers.
  2. We don’t pollute the model’s tool_result with bashwrap-internal noise (env snapshot, publish attempts, etc.).
  3. We can tail the file from outside the agentmux process tree.

Falls back to stderr at WARN level if the file can’t be opened.