Skip to content

Automatic Context Management for Large Code Generation #92

Closed as duplicate

Description

@matthewlloyd

Bug Description
Whenever I try to implement a complex feature, it thinks for a while then gives an API Error 400 "input length and max_tokens exceed context limit: 195769 + 20000 > 204698, decrease input length or max_tokens and try again".

It's not clear what to do next to avoid losing the work done so far. Should the user /compact? If so, how should the user retry or continue the process without losing too much state?

Claude Code should handle this itself, automatically. The context limit is an implementation detail of the underlying model used, and the user should be at least partially shielded from having to manage it.

Environment Info

  • Platform: macos
  • Terminal: iTerm.app
  • Version: 0.2.9
  • Feedback ID: 69dd5ffb-ec31-4562-9ba8-0c1f77c8320e

Activity

  1. adhd commented on Feb 26, 2025

    @adhd

    Same issue here.

  2. github-actions commented on Aug 9, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions