[FEATURE]: Token context count available to the LLM #7252

Open
opened 2026-02-16 18:06:35 -05:00 by yindo · 2 comments
Owner

Originally created by @RikishK on GitHub (Jan 22, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

So we have the current token count on the top right in opencode (I use opencode.nvim).

Can we give a tool to the llm to also see this count / percentage, so we can choose to do custom wrap up procedures at certain thresholds.

Doing this manually atm, but sometimes the llm keeps going and I miss it and it does the auto compact which I don't like.

Or if there's any way to already mess around with the compact?

Originally created by @RikishK on GitHub (Jan 22, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request So we have the current token count on the top right in opencode (I use opencode.nvim). Can we give a tool to the llm to also see this count / percentage, so we can choose to do custom wrap up procedures at certain thresholds. Doing this manually atm, but sometimes the llm keeps going and I miss it and it does the auto compact which I don't like. Or if there's any way to already mess around with the compact?
yindo added the discussion label 2026-02-16 18:06:35 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10017: Feature Request: Custom compaction threshold to trigger earlier
  • #8140: Feature Request: Configurable context limit and auto-compaction threshold
  • #6152: [FEATURE]: Session context usage (similar to /context in Claude)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #10017: Feature Request: Custom compaction threshold to trigger earlier - #8140: Feature Request: Configurable context limit and auto-compaction threshold - #6152: [FEATURE]: Session context usage (similar to /context in Claude) Feel free to ignore if none of these address your specific case.
Author
Owner

@RikishK commented on GitHub (Feb 13, 2026):

Hey, Happy to make this contribution. Seems like I can't push and open a PR. Would it be okay if I take on this issue / is this concept alright? It is adding a new basic tool, so not sure if you want something like this or not.

@RikishK commented on GitHub (Feb 13, 2026): Hey, Happy to make this contribution. Seems like I can't push and open a PR. Would it be okay if I take on this issue / is this concept alright? It is adding a new basic tool, so not sure if you want something like this or not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7252