Skip to content

[BUG] Error during compaction #7530

@mtaksa

Description

@mtaksa

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The /compact command fails with an error message stating "Conversation too long. Press esc twice to go up a few messages and try again." This prevents users from compacting their conversation history when the conversation becomes lengthy.

What Should Happen?

The /compact command should successfully compress the conversation history regardless of length, summarizing previous messages while preserving important context. Users should be able to compact conversations of any reasonable size to manage token usage and maintain conversation continuity.

Error Messages/Logs

Steps to Reproduce

  1. Start a new conversation in Claude Code
  2. Have an extended conversation with multiple tool calls, file reads, and edits (likely 50+ messages)
  3. Run the /compact command
  4. Observe the error: "Error during compaction:Error: Conversation too long. Press esc twice to go up a few messages and try again."

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

1.0.111

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

Labels

area:corebugSomething isn't workingduplicateThis issue or pull request already existshas reproHas detailed reproduction stepsmemoryoncallplatform:macosIssue specifically occurs on macOS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions