You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-zy1p--tool-results-...

44 lines
1.5 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
# claudbg-zy1p
title: Tool results hidden by default in transcriptions — should show with truncation
status: todo
type: bug
created_at: 2026-03-30T04:44:18Z
updated_at: 2026-03-30T04:44:18Z
parent: claudbg-8vpb
---
## Problem
Tool results (the output of tool calls) are hidden unless the user passes `--include output`. Since tool outputs are a core part of understanding what happened in a session, they should be visible by default.
## Expected behavior
- Tool results shown by default (no flag needed).
- Truncated to ~200 chars by default (current limit, keep it).
- `--verbose` removes the truncation cap and shows full output.
- The `--include output` flag / `opts.include.output` gate should be removed (or inverted).
## Current behavior
`render_entry_text` in both `sessions.rs` and `agents.rs` gates `ToolResult` on `opts.include.output`:
```rust
if opts.include.output {
// show tool result
}
```
With the default `--include ""`, `opts.include.output` is `false`, so results are never shown.
## Fix
Remove the `if opts.include.output` guard (or replace it with the inverse: hide only when an explicit `--include no-output` flag is passed, but that's over-engineering — just always show with truncation).
Also apply the same change to the `--verbose` path: when `opts.verbose` is true, show the full content uncapped.
## Relevant files
- `src/commands/sessions.rs``render_entry_text`, `ToolResult` branch (~line 113131)
- `src/commands/agents.rs``render_entry_text`, same branch (~line 7492)