[loop-generated] [bug] Tool display censors max_tokens= as secret, causing false bug reports #625

Closed
opened 2026-03-20 20:28:34 +00:00 by Timmy · 1 comment
Owner

Problem

The read_file and Gitea raw API tools censor any line containing max_tokens= followed by text — treating it as a secret/token value. This displays as:

  • max_tokens=reques...ens (for max_tokens=request.max_tokens)
  • max_tokens=*** (for max_tokens=max_tokens)

This directly caused #619 to be filed as a bug when the code was actually valid Python.

Impact

  • False bug reports waste cycle time
  • Diffs look broken when they are not
  • Makes it impossible to review max_tokens-related code through normal tools

Workaround

Use python3 -c with hex dump to verify actual file contents when censoring is suspected.

Root Cause

Likely a regex in the display pipeline that matches tokens= or token= as a secret pattern.

Suggested Fix

The censoring heuristic should not match Python keyword arguments like max_tokens=variable_name. Only standalone token=<hex-looking-value> patterns should be censored.

## Problem The `read_file` and Gitea raw API tools censor any line containing `max_tokens=` followed by text — treating it as a secret/token value. This displays as: - `max_tokens=reques...ens` (for `max_tokens=request.max_tokens`) - `max_tokens=***` (for `max_tokens=max_tokens`) This directly caused #619 to be filed as a bug when the code was actually valid Python. ## Impact - False bug reports waste cycle time - Diffs look broken when they are not - Makes it impossible to review max_tokens-related code through normal tools ## Workaround Use `python3 -c` with hex dump to verify actual file contents when censoring is suspected. ## Root Cause Likely a regex in the display pipeline that matches `tokens=` or `token=` as a secret pattern. ## Suggested Fix The censoring heuristic should not match Python keyword arguments like `max_tokens=variable_name`. Only standalone `token=<hex-looking-value>` patterns should be censored.
Author
Owner

This is a Hermes harness issue (tool-level censoring), not dashboard code. The censoring regex lives in the Hermes display pipeline, not in this repo. Marking as wontfix for this repo — should be tracked in hermes/hermes-config if needed.

This is a Hermes harness issue (tool-level censoring), not dashboard code. The censoring regex lives in the Hermes display pipeline, not in this repo. Marking as wontfix for this repo — should be tracked in hermes/hermes-config if needed.
Timmy closed this issue 2026-03-20 20:33:13 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#625