Skip to content

[Bug]: Context token limit/usage randomly jumps to 1M tokens despite configured bounds #1097

Description

@kacode357

Problem (one or two sentences)

The context window token calculation intermittently bugs out and jumps up to 1M (1,000,000) tokens, ignoring the configured context limit (e.g., 250k tokens) set in the UI.

Context (who is affected and when)

Users working on tasks with auto-condensing or dynamic context updating, where the token count bar unexpectedly spikes/resets to a 1M token ceiling.

Reproduction steps

Set up a task with a restricted context window (e.g., 250k token limit).

Run requests or let the context auto-condense/update.

Observe the token usage bar: the context capacity/counter randomly jumps up to 1M tokens instead of staying within the designated limit.

Expected result

The context token bar and limit should accurately reflect and strictly adhere to the configured model/session bounds (e.g., max 250k tokens).

Actual result

The context token count or ceiling suddenly jumps to 1M tokens (1,000,000 tokens) during context condensing/refreshing.

Variations tried (optional)

Happens intermittently across different prompts and conversation lengths.

App Version

Version: 3.74.0 (6c23a1c)

API Provider (optional)

None

Model Used (optional)

No response

Zoo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions