-
Notifications
You must be signed in to change notification settings - Fork 711
Description
Describe the bug
When running commands in Copilot CLI that use tail (e.g., piping output such as tail -5 or tail -20), the CLI incorrectly shows a yellow "Truncated" warning message. This appears even when the model output is not actually truncated, which is confusing to users—especially in new sessions. It seems Copilot CLI is detecting the "tail" command or truncated output as if the Copilot model response was truncated, causing misleading UX.
Reproduction command example:
ssh root@xxx.xx.xx.xx "cd /root/ZIME-Framework && python3.11 -m pytest --co -q | tail -5 && echo '---' && python3.11 -m pytest -v --tb=short 2>&1 | tail -20"
Observed:
- Copilot CLI displays the yellow "Truncated" message in the output.
- This message shows up even when the Copilot session is brand new.
- The output itself is intentionally trimmed by the use of
tail.
Analysis:
I figured out the "Truncated" message... Copilot CLI incorrectly displays a yellow "Truncated" indicator regardless of the session stats for brand new sessions, most likely because of tail usage! It confuses the truncated command with a truncated model output.
Impact:
This misleading warning may make users think Copilot itself has cut off content, when in reality the shell output is intentionally limited.
Affected version
0.0.362
Steps to reproduce the behavior
- Run a shell command in Copilot CLI that pipes output through
tail, e.g.:[your shell command] | tail -5 - Observe that Copilot CLI displays a yellow "Truncated" message regardless of whether the session is new or long.
- The "Truncated" message appears to be induced by the use of
tail, not by any actual truncation of the model response.
Expected behavior
The "Truncated" warning should only appear if the AI model's response is actually cut off due to token limits, not because the user's command uses tail or truncates shell output intentionally.
Additional context
- The issue is reproducible across different shell sessions.
- The command shown is a typical workflow for verifying test baselines (using ssh and pytest with tail).
- CLI version: 0.0.362
- OS: Linux
- Terminal: GNOME Terminal
- The behavior is misleading and may confuse users about whether their Copilot output is incomplete.