github / github/copilot-sdk

CLI is passing trancuated snippet from Tool result to LLM

Offen
#1,000 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Java
Sterne
10.5k
Forks
1.5k
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
127

Beschreibung

CLI is sending the trauncated tool result to LLM instead of writing the file to disk and read the entire text. This results in a incorrect response from LLM since it does not have the entire Tool Result in the context

At 50KB threshold (inline path):
• The tool result was under 50KB, so the CLI passed it inline to the LLM as textResultForLlm
• But the CLI applies token-based truncation before sending to the LLM — you can see this in the telemetry: "truncateBasedOn":"tokenCount","truncateStyle":"middle"
• The LLM receives a truncated version and has no way to read the rest — the full text only existed in memory, never on disk

The real gap is that there's no hybrid: "inline a truncated preview AND save the full content to a file so the LLM can read more if needed." That would be the ideal behavior,

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.