Hi all! I’ve started using OpenHands Cloud and I c...
# questions
c
Hi all! I’ve started using OpenHands Cloud and I cannot find a command to compact or clear the context window. I know there is a automatic feature called “Memory Condenser”, but I want to call it manually between my pipeline stages in a single conversation.
m
Hey! 👋 Short answer: OpenHands Cloud doesn't currently expose a manual "condense" command. The Memory Condenser only fires automatically when context crosses its threshold. Will that unblock you? Could you please fill an issue in OpenHands/OpenHands ? Thanks
a
Hmm, I like the idea of being ble to call the condensor whenever you want - probably a good feature request
c
Looks like this command already exists or existed earlier https://github.com/OpenHands/OpenHands/issues/8276
w
It exists for the CLI, but nowhere else I believe. ETA: It's available as a method on
Conversation
objects in the SDK, so you can use it there too.
👀 1
If you're coming from another coding agent, I should warn you the default condenser doesn't quite work like compaction does in other agents. Instead of clearing the entire context, it summarizes the first half and preserves the second half. This helps keep the agent on-track while keeping costs under control. If you want to keep the same runtime in OH Cloud while getting a fresh context I believe the
/new
command will do that.
m
About the issue: The issue was closed as "addressed," but the thing that landed is a code-level condense() method/endpoint. The user-typeable /condense command was closed without merging, so functionally you do not have a /condense command. The PR merged give you just the triggered mechanism.
c
@wide-doctor-37830 Yes, I came from an agent-based tooling background. I might not fully understand the OpenHands approach, but I found working in a single conversation convenient for the pipeline I developed. Currently, memory clearing only works when creating a new conversation, as far as I understand. This might be inconvenient if the task pipeline includes multiple steps, each requiring memory clearing.