What's the policy when it comes to implementing to...
# proj-cli
a
What's the policy when it comes to implementing tool changes? Just upgraded to latest and it implemented https://github.com/OpenHands/OpenHands-CLI/pull/341 (was a bit behind) And now every old conversation is spawning
Copy code
Cannot resume conversation: tools cannot be changed mid-conversation (added: ['delegate']). To use different tools, start a new conversation.
Should we assume new tools is a breaking change? Or fail gracefully?
l
Ahh, thanks for raising, I think we should try to be backward compatible: cc @quick-window-91705 and @modern-fireman-99755
nod 1
🙌 1
a
Thanks! Workaround for now is updating the statefile to include the tool 😂
l
@nutritious-balloon-65098 could you create a simple conversation from OpenHands/software-agent-sdk from 2 versions back, and then try to continue it with the main branch of OpenHands to reproduce this error. If you are able to do this, then create a test that tries to load this older conversation and fails, demonstrating the lack of backward compatibility and open a draft PR on the OpenHands/software-agent-sdk repo
n
I'm on it! Graham Neubig can track my progress here.
m
Oh yes this is a good point… tools are frozen wrt conversations as they are part of the system prompt (the tool descriptions). We will have the same issue if you change the system prompt in main (sdk).
The delegate tool is added a CLI level, i.e, we could revert the change and do a new release as an hot fix.
n
Final summary: Checklist: - [x] Reproduced the compatibility issue by resuming a
v1.11.5
CLI conversation on current
main
with
delegate
added - [x] Added a focused regression fixture and test to document the failure mode - [x] Kept the changes concise: only the new fixture and the targeted test were committed - [x] Committed and pushed the branch - [x] Opened a draft PR on
OpenHands/software-agent-sdk
New since my last summary: - I verified the branch is clean and the pushed commit is the expected one: - Branch:
test/delegate-resume-regression
- Commit:
04bc13d95d9a69400a9c37602db5d15be9f104d7
- I confirmed the draft PR is open: - PR #2382: https://github.com/OpenHands/software-agent-sdk/pull/2382 Net result: - The repo now contains a minimal regression artifact showing that an older persisted conversation from
v1.11.5
fails to resume on current
main
when the runtime toolset appends
delegate
, demonstrating the current lack of backward compatibility.
m
I checked and it seems that the test produced by OpenHands is reproducing the issue. I just did a fast investigation and other fields that could break the deserialization process are: 1. ConversationState.agent — AgentBase (kind-discriminated): If the class is renamed 2. ConversationState.agent.llm — LLM: if fields are removed or made required without defaults 3. ConversationState.agent.condenser — CondenserBase | None (kind-discriminated) : Renaming or removing a condenser subclass breaks restore 4. ConversationState.agent.tools — list[Tool]: if the tool name is no longer registered or new tool is registered. 5. ConversationState.workspace — BaseWorkspace (kind-discriminated): Renaming LocalWorkspace breaks load 6. ConversationState.confirmation_policy — ConfirmationPolicyBase (kind-discriminated): Rename 7. ConversationState.security_analyzer — SecurityAnalyzerBase | None (kind-discriminated) 8. ConversationState.secret_registry — SecretRegistry 9. ConversationState.hook_config — HookConfig | None: field removals or renames in HookConfig break old states 10. Event.kind — the top-level discriminator on every event: renaming any event class 11. SystemPromptEvent.tools[*] — list[ToolDefinition] (triple risk) 12. ConversationState itself: Any new required field without a default added to ConversationState breaks all old Just that we are aware of that. It seems that the biggest issue is coming from the tools field.
c
That's a very interesting list!
🤔 For the record, we’ve been going back and forth on the tool addition issue: last time we’ve removed it, I think it was in relation with conversations via agent-server, and the system prompt sent to clients wasn’t anymore “accurate”
l
@modern-fireman-99755 do you think this is ready to merge? https://github.com/OpenHands/software-agent-sdk/pull/2382
m
Yes 👍 merged