OpenHands / OpenHands/OpenHands
[Bug]: New chat retains context/state from the previous conversation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 88.5k
- Forks
- 11.6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 189
Description
Operating System
Windows
Installation Method
From source (npm run dev / npm run dev:minimal)
Agent Canvas Version
1.17.0
Bug Description
When starting a new conversation from another conversation/chat, the context-usage button and the usage of that specific conversation is retained in the new conversation.
This could mean that the context-usage or UI related things are not being properly managed.
Steps to Reproduce
- From the source, run
npm run dev - Open an existing conversation.
- Start a new chat using the
New Chatbutton. - Observe the new conversation UI before sending a message.
- Notice that the context-usage button/state from the previous conversation is still displayed.
- Refresh the page.
- Observe the context-usage state again.
Actual Behavior
As you can see the screenshot, the context-usage is shown on a new chat.
Expected Behavior
A newly created conversation should start with conversation-scoped context-usage state reset to its initial state (zero).
The context-usage button/usage from the previous conversation should not be carried over to the new conversation unless that state is intentionally global.
Relevant Logs
Acceptance Criteria
- A newly created conversation does not display stale context-usage
state from the previous conversation. - Conversation-scoped context usage is reset when starting a new chat.
- Refreshing the page does not restore stale context-usage state.
- Existing conversations retain their own context-usage state.
- No regression to normal context-usage tracking.
Screenshots
No response
Additional Context
Hi there! I'd love to look into this problem and help out here. I have already reproduced the behavior locally and will be glad to contribute my code via a PR, provided that the scope is reasonable. May I take up this task?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with npm run dev or npm run dev:minimal and reproduce the issue through the New Chat button using the listed steps. Trace how context-usage state is initialized and retained when switching conversations, then verify that new chats reset it, refreshes do not restore stale state, and existing conversations keep their own usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100