Skip to content

[BUG] Extension artificially bloats context size with @/folder tags, triggering continuous context condensation loops #1539

Description

@pabloqello

Describe the bug
After updating to the latest version, referencing a directory (e.g., @/web) artificially inflates the context token count to millions (e.g., 3.1M tokens on a 1.0M limit, showing 382% usage), even when the directory contains only a lightweight index.html file (~10 lines).

This inflated estimation triggers a continuous "Context Condensed" (Auto-summarization) loop on every request, attempting to compress ~2.5M tokens into ~30k tokens continuously, freezing performance and cluttering the chat window.

Note: I verified in my API Provider Dashboard that actual token usage and billing are normal (almost $0.00), confirming this is a client-side context calculation / token counting bug in the UI/extension.

Steps to Reproduce

Update to the latest version of the extension.

Open a new chat session.

Reference a directory tag such as @/web.

Send a prompt.

Observe the token meter jump to 3M+ tokens and immediately trigger context condensation.

Expected behavior
The context calculator should properly read only the files inside the directory, respect ignore rules, and accurately reflect real prompt token counts without triggering infinite auto-condensation loops.

Activity

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

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions