OpenHands CLI seems to be obsessed with the origin...
# feedback
f
OpenHands CLI seems to be obsessed with the original objective it was given in this session. Every following question or request (unrelated to the original), it would go back to the original as well and repeat the entire original steps. It would still carry out the new request, but also the old one every time. It came to a point where it's final message would be all about the old objective (despite not mentioning it for the last 500 events), and add a single line at the end related to the newest...
c
Must be the condenser. Just to make sure: did the conversation have the default summary condenser disabled by any chance? That would definitely have this behavior, because then it applies truncation... 🤔 unless it now does truncation first anyway
👀 1
f
I'm guessing condenser is enabled by default. Also because the session directory contains an
event_cache
which I'm guessing is related
c
OK, it should be enabled. The event_cache doesn't depend on this, though, it's done all the time
f
Is there a way to check? I thought the setting would be in the cloud app, but it isnt there
c
Sorry, what do you mean in the cloud app? I thought this was with the CLI?
f
Sorry you're right, I got confused. Literally running 3 different instances for 3 different issues and got mixed up 😅
lolsob 1
c
I see it was enabled, and I think this was the last summary https://gist.github.com/enyst/99905c403ae291256f1b91df89091633
Cc: @wide-doctor-37830 I guess it's possible that it wasn't clear enough to the LLM, to make it understand the current status, so to speak. The first user message is always in history, so it's important
w
@calm-artist-7206 That's a reasonable explanation. We've seen this issue in the past but seemed to get it fixed with some prompt changes. @freezing-spoon-14104 Do you know which model you were using for this session?
f
claude 4.1
w
Oh, interesting. I haven't run any condenser tests with 4.1 yet, probably needs a bit of a tune.
Does the summary Engel linked look reasonable to you given the context of the conversation? Just trying to figure out if it's the system prompts or the summarization prompts messing things up.
f
Yes what Engel suggested completely makes sense
Oh wait I misread the question
Yeah so that does summarize the conversation, but OpenHands kept on referencing the
COMPLETED
part of the md he shared. Not only, but sometimes it would repeat the repository discovery actions to answer the already answered question after it completes the most recent objective I requested
w
That's helpful context, thanks. Sounds like the model just isn't paying as much attention to the summary as it should. I'm going to see if I can recreate this behavior then iterate on a few system prompts.
c
Calvin, just to note, in general • it’s a bit difficult for me to experience or even intuit this very well, for a while, because I know how it works, so I reflexively prompt it to steer it past • I sometimes even start sessions with a simple “ask me what we do”, which will work just fine no matter if the first user message becomes too important again • at some point we had some concept of “the task” set to the first user message after a Finish action, or initial user message if no Finish yet. Not sure it’s still in the code, but it doesn’t work that way anymore (since it gets condensed)
w
Definitely agree with your first point! I didn't know about "the task" concept. Not sure how I'd surface that post-condensation, but I wonder if I can do some prompt tweaking to combine it with your second point: 1. Get the agent to figure out the current task, 2. Focus on getting the current task from recent messages, then from summaries, then from the initial context, 3. Ask the user what to do if the task isn't clear.
👍 1
c
This makes sense, I feel it might be difficult, but 🤷‍♂️
This reminds me though… the LLM doesn’t even know the initial context during summarization, right?
w
No, it's only given the events to be summarized. At one point I was experimenting with giving the summarizer more context but it kept on "over-summarizing" and including info from the other context.
c
Ah I see. In this case, of the initial message, idk, I keep thinking how truncation was failing: it was failing worse when the discrepancy between the first message and the next [so the last messages] was higher.
Idk. Maybe if the agent figures out the task as you said, it would be really nice, it would link it to the rest of messages in a more coherent way.
w
it was failing worse when the discrepancy between the first message and the next [so the last messages] was higher.
My intuition behind the summary was that it acted as a bridge between those two. But maybe there's still too much of "a gap" between it and the initial messages. I'm not sure quite how I'd quantify that.
nod 1