Claude Code Shows Only the Start and End of Long Background Command Output

Claude CodeView original changelog

Claude Code 2.1.321 changes background command notifications and TaskStop results to show Claude only the start and end of a command's output when it runs past 1,000 characters. The change saves context in long sessions.

Key Takeaways

  • Output over 1,000 characters is trimmed in background command notifications and TaskStop results.
  • Claude sees the start and the end, and not the middle.
  • The aim is to save context in long sessions.
  • Failures usually show at the end of a log, so the trimmed view keeps the most useful part.
  • This is a behavior change, not a fix: Claude now sees less of a long command's output by default.
  • It follows other context-saving changes, such as the shorter /context table.

Less output in Claude's context

When a command runs in the background, Claude Code tells Claude when it finishes and what it printed. Claude Code 2.1.321 changes this for long output. For a command whose output goes over 1,000 characters, background command notifications and TaskStop results now show Claude only the start and the end. The middle is left out.

Why it matters

Long build logs, test runs and watchers can print thousands of lines. Putting all of it into Claude's context uses up room that Claude needs for the actual work, and can push earlier conversation out of the window sooner. Keeping the beginning and the end preserves what usually matters most, which is how the command started and how it finished or failed. Developers who need the full output can still read it from the command's own log.

Claude Code Trims Long Background Command Output | Yet Another Changelog