Skip to content

Error: 400 Input length ____ exceeds the maximum allowed input length of ____ tokens #652

Description

@DXXS

Summary

When using the ~recently released "Laguna-s-2.1" model, which appears to do a considerable amount of 'thinking', I have regularly encountered the message "Error: 400 Input length ____ exceeds the maximum allowed input length of ____ tokens" (in many cases, with a very small minority :: <~100/100000'th overflow) after interacting with a project's code for awhile. Shortly thereafter, it will refuse to compact (yet still emit too large an input, thus rendering the 'task' effectively unable to complete). The first few such can usually be overcome by a manual /compact (which seems to compact more than the 'auto-compact' sort), followed by 'continue'. After which command, it fails to 'continue' even when 'compact' is claimed to have 'saved' hundreds of thousands of tokens. At which point I have to switch to DeepSeek-V4-Flash-0731 or similar to ~complete. Commands such as "/usage" do not appear to show useful information about the issue.

Expected Behavior

It would seem to me that if context is indeed irretrievably ~overstuffed, then that should be reflected by the /compact command

Actual Behavior

manual /compact claims to recover many tokens, yet overflow errors continue

Steps to reproduce the issue

As shown in report overview

Command Code Version

1.14.1

Operating System

macOS

Terminal/IDE

OSX 'Terminal' w / cmd

Shell

zsh

Session file (optional)

No response

Fix prompt (optional)

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions