What happened?
The official settings documentation says tools.truncateToolOutputThreshold applies to Shell. However, Shell currently uses a fixed 30,000-character budget that takes precedence over the configured value.
As a result, a 40,000-character Shell result is truncated even when the threshold is configured as 100,000.
How to reproduce
-
Add the following settings and restart Qwen Code:
{
"tools": {
"truncateToolOutputThreshold": 100000,
"truncateToolOutputLines": 100000
}
}
-
Run this command with Shell:
node -e "process.stdout.write('x'.repeat(40000))"
-
Inspect the model-facing Shell result or chat record. The result is truncated and contains:
Tool output was too large and has been truncated.
Depending on the client surface, the visible output may instead show that the full output was saved to a file.
What did you expect to happen?
Shell should honor tools.truncateToolOutputThreshold. If 30,000 characters is an intentional hard limit, the settings documentation should explain that the configured threshold cannot override it for Shell.
Client information
- Qwen Code: 0.21.8
- Node.js: v24.14.1
- Platform: macOS arm64
Anything else we need to know?
Reproduced with the configuration and command above. The full saved output was approximately 40 KB.
On current main (7ebd137edb7e48af1ffd447f1ed7a9bb1ed53799 when verified), Shell passes threshold: 30_000 to the truncation helper, while the helper gives the per-call threshold precedence over config.getTruncateToolOutputThreshold().
The fixed per-tool budget appears to have been introduced by #4880. Related broader tracking issues include #2818 and #7306.
What happened?
The official settings documentation says
tools.truncateToolOutputThresholdapplies to Shell. However, Shell currently uses a fixed 30,000-character budget that takes precedence over the configured value.As a result, a 40,000-character Shell result is truncated even when the threshold is configured as 100,000.
How to reproduce
Add the following settings and restart Qwen Code:
{ "tools": { "truncateToolOutputThreshold": 100000, "truncateToolOutputLines": 100000 } }Run this command with Shell:
node -e "process.stdout.write('x'.repeat(40000))"Inspect the model-facing Shell result or chat record. The result is truncated and contains:
Depending on the client surface, the visible output may instead show that the full output was saved to a file.
What did you expect to happen?
Shell should honor
tools.truncateToolOutputThreshold. If 30,000 characters is an intentional hard limit, the settings documentation should explain that the configured threshold cannot override it for Shell.Client information
Anything else we need to know?
Reproduced with the configuration and command above. The full saved output was approximately 40 KB.
On current
main(7ebd137edb7e48af1ffd447f1ed7a9bb1ed53799when verified), Shell passesthreshold: 30_000to the truncation helper, while the helper gives the per-call threshold precedence overconfig.getTruncateToolOutputThreshold().The fixed per-tool budget appears to have been introduced by #4880. Related broader tracking issues include #2818 and #7306.