nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] Subagent transcript view appends "..." to every tool result, even short ones that weren't truncated

Open addyCooks opened this issue 2 months ago • 2 comments

Description

The subagent transcript view slices every tool result to 100 characters and unconditionally appends ..., regardless of whether the content was actually longer than 100 characters. A short tool result like OK renders as OK..., falsely implying output was cut off when none was.

Parent: #907

Steps to Reproduce

  1. Run or view a subagent whose tool call returns short output (e.g. list_directory on an empty directory, or any tool returning a brief success message).
  2. Look at the subagent's transcript view.

Expected Behavior

The ... suffix only appears when the content was actually longer than the truncation limit, same as the equivalent, correctly-guarded logic elsewhere in the codebase.

Actual Behavior

Every tool result line in the subagent view ends in ..., even when the full content is shorter than 100 characters and nothing was cut off.

Root Cause

source/components/subagent-view.tsx:78:

message={`⚒ ${msg.name}: ${msg.content.slice(0, 100)}...`}

Compare the correctly-guarded equivalent already used elsewhere, source/tools/git/git-commit.tsx:251-252:

{args.body.length > 100
	? `${args.body.substring(0, 100)}...`
	: args.body}

The subagent view is the one place that skips the length check before appending the ellipsis.

Suggested Fix

Only append ... when msg.content.length > 100, matching the guarded pattern already used in git-commit.tsx.

Additional Context

  • [x] I have searched existing issues to ensure this is not a duplicate
  • [x] I can reproduce this issue consistently (verified by direct code trace against current main; cosmetic severity lowest priority of this batch)
  • [x] This issue occurs on the latest main

addyCooks avatar Sep 20 '26 08:09 addyCooks

Hi @akramcodez, could you assign this to me?

addyCooks avatar Sep 20 '26 08:09 addyCooks

Picking this up - a fix will follow shortly.

awhite0030 avatar Sep 22 '26 00:09 awhite0030