Q36: What happens when the context sent to GitHub Copilot exceeds the LLM's maximum token limit?

When prompt context exceeds model token limits, the Copilot client employs context truncation heuristics: prioritizing active cursor lines, prefix/suffix code, open tabs, and dropping distant background files.

Key Takeaways
  • Context is truncated based on proximity to active cursor.
  • Active file prefix/suffix takes priority over distant repository files.
Knowledge Check

How does Copilot handle workspace context that exceeds model token capacity?