Skip to content

Fix 'llm logs -t' leaving system and reasoning untruncated - #1658

Open
rdslw wants to merge 1 commit into
simonw:mainfrom
rdslw:fix-logs-truncate-reasoning
Open

rdslw wants to merge 1 commit into
simonw:mainfrom
rdslw:fix-logs-truncate-reasoning

Conversation

@rdslw

@rdslw rdslw commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

llm logs -t only truncates prompt and response. The reasoning column (added in the visible-reasoning commit) and system pass through at full length, so llm logs --json -t -n1 still dumps multi-KB reasoning blobs. The same rows feed the markdown renderer.

annotate_log_rows() now truncates system and reasoning to the same 100-char limit. A null value stays null rather than becoming "", matching the truthiness check the renderer already uses for reasoning.

Created with help of Fable-5.1.

annotate_log_rows() only cut prompt and response under -t. The
reasoning column (added upstream by the "Persist visible reasoning"
commit) and the system column passed through at full length, so
'llm logs --json -t' still dumped multi-KB reasoning blobs, contrary to
the "Truncate long strings in output" help text. Same path feeds the
markdown renderer.

- truncate system and reasoning to the same 100-char limit
- a null value stays null (no system prompt, no reasoning emitted)
  rather than becoming "" like prompt/response do; matches the
  truthiness check the markdown renderer already uses for reasoning
@rdslw
rdslw force-pushed the fix-logs-truncate-reasoning branch from fa79ec5 to cc79285 Compare September 2, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants