Skip to content

Used context window tokens counter is working incorrectlyΒ #6004

@fedorbass

Description

@fedorbass

App Version

Version: 3.23.16 (e07de26)

API Provider

AWS Bedrock

Model Used

Claude 4 Sonnet

Roo Code Task Links (Optional)

No response

πŸ” Steps to Reproduce

Setup (OS, extension version, settings):
MacOS 15.5 (24F74), VS Code Version: 1.102.1 (Universal)
Exact actions (clicks, input, files, commands):
Chatting with Roo normally

πŸ’₯ Outcome Summary

The token count seems to be incorrect and is likely to change the count after VS Code restart.

  • I often see the token count number under 100, or even 0, which is unrealistic.
  • I started hitting the context window exceeded alert often, while the token count is significantly lower the window limit. (screenshots attached)
  • Chat history condenser doesn't work, with 2 types of outcomes:
    -- Ends with an alert that the process could not be finished and skipped, due to the token count changing during the operation.
    -- Progress icon spins forever
Image Image

πŸ“„ Relevant Logs or Errors (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions