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-kg0v--tool-use-inpu...

1.6 KiB

title status type priority created_at updated_at parent
Tool use input truncated at 120 chars regardless of --verbose completed bug normal 2026-03-30T04:44:31Z 2026-03-30T05:13:37Z claudbg-8vpb

Problem

Tool use input (arguments passed to a tool) is hard-capped at 120 characters in transcriptions, cutting off commands mid-content:

[tool: Bash] {"command":"nix develop --command bash -c \"./target/debug/claudbg --help && echo '===' && ./target/debug/claudbg sessio

Expected behavior

  • Default: truncate at 120 chars (or a slightly higher value like 200) with a indicator.
  • --verbose: show full input, no truncation.

Current behavior

Both render_entry_text implementations use a hardcoded 120-char cap regardless of opts.verbose:

// src/commands/sessions.rs:108-110
let input_preview = serde_json::to_string(input).unwrap_or_default();
let boundary = input_preview.floor_char_boundary(120);
let input_short = &input_preview[..boundary];

The opts.verbose flag is checked nowhere in the tool use branch.

Fix

let cap = if opts.verbose { usize::MAX } else { 120 };
let boundary = input_preview.floor_char_boundary(cap);

Same change needed in agents.rs.

Relevant files

  • src/commands/sessions.rsrender_entry_text, ToolUse branch (~lines 107111)
  • src/commands/agents.rsrender_entry_text, ToolUse branch (~lines 6872)

Summary of Changes

In sessions.rs and agents.rs render_entry_text ToolUse branch: replaced hardcoded 120-char cap with cap=usize::MAX when opts.verbose, 120 otherwise. Added ellipsis indicator when content is actually truncated.