#8493: fix(tui): filter NO_REPLY token from chat display
stale
Cluster:
Webchat NO_REPLY Handling
## Summary
Filter silent reply tokens (NO_REPLY) from TUI display to prevent literal token text from appearing in the chat log.
## Problem
When an agent responds with `NO_REPLY` (the silent reply token), the TUI was displaying it literally instead of suppressing it. This could create echo loops in agent-to-agent communication.
## Solution
- Import `isSilentReplyText` and `SILENT_REPLY_TOKEN` from `auto-reply/tokens.ts`
- Wrap `chatLog.finalizeAssistant()` call with a check to filter out silent replies
## Testing
- TypeScript compiles cleanly
- Lint passes for modified file
Closes #8347
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the TUI chat event handling to suppress rendering of the silent reply token (`NO_REPLY`). In `src/tui/tui-event-handlers.ts`, it imports `isSilentReplyText`/`SILENT_REPLY_TOKEN` and guards the `chatLog.finalizeAssistant(...)` call so that finalized assistant messages that are just the silent-reply sentinel are not appended to the chat log. This prevents the literal token text from showing up in the terminal UI and reduces the chance of downstream echo/loop behavior when agents communicate via the silent-reply mechanism.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with low risk and a narrow behavior change.
- Change is a small guard around final chat rendering, using a dedicated token helper with clear intent. The main remaining concern is completeness (delta/streaming path can still surface the token briefly) rather than correctness or stability.
- src/tui/tui-event-handlers.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#16361: Gateway: suppress NO_REPLY in webchat
by shadril238 · 2026-02-14
83.7%
#8334: fix(webchat): Filter NO_REPLY messages from chat history
by vishaltandale00 · 2026-02-03
83.1%
#23761: fix: suppress partial NO_REPLY tokens at lifecycle boundary
by kami-saia · 2026-02-22
80.8%
#15118: Fix webchat ghost bubble when model replies with NO_REPLY
by jwchmodx · 2026-02-13
80.5%
#19576: fix: tighten isSilentReplyText to match whole-text only
by aldoeliacim · 2026-02-18
79.8%
#19916: fix: strict silent-reply detection to prevent false positives with ...
by hayoial · 2026-02-18
78.7%
#6502: fix(tui): skip empty text for tool-only assistant turns
by douvy · 2026-02-01
78.7%
#4495: Fix: emit final assistant event when reply tags hide stream
by ukeate · 2026-01-30
78.1%
#21462: fix(agents): hold back partial NO_REPLY token in pi-embedded streaming
by algal · 2026-02-20
77.5%
#19648: fix: suppress silent-reply partial tokens during streaming
by bradleypriest · 2026-02-18
77.0%