Skip to content

fix: add session cleanup to AgentDelegationTool#15996

Merged
tortmayr merged 1 commit intomasterfrom
tortmayr/issues/15995
Jul 14, 2025
Merged

fix: add session cleanup to AgentDelegationTool#15996
tortmayr merged 1 commit intomasterfrom
tortmayr/issues/15995

Conversation

@tortmayr
Copy link
Contributor

What it does

Cleanup the session created by the AgentDelegationTool after the tool invocation has completed i.e. the response from the newly created session has been received.

Fixes #15995

How to test

Follow the instructions of #15995

Observe that when clicking the Show Chats button any temp session that as been created by the AgentDelegationTool is no longer visible i.e. has been removed successfully.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

Cleanup the session created by the `AgentDelegationTool` after the tool
invocation has completed i.e. the response from the newly created
session has been received.

Fixes #15995
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jul 13, 2025
@sdirix
Copy link
Member

sdirix commented Jul 14, 2025

Personally I think it would be cleaner if these sessions are never added to the shown sessions in the first place. Do you think this would be easily possible?

@tortmayr
Copy link
Contributor Author

Personally I think it would be cleaner if these sessions are never added to the shown sessions in the first place. Do you think this would be easily possible?

I agree.
Unfortunately we currently have no way to distinguish between "real" sessions and nested/delegated sessions created by the AgentDelegationTool. So I don't see an easy way to filter them out.
Even if we would manage to only show "real" sessions, we still have to cleanup the secondary session once the tool invocation is completed.
So I don't think there is any harm in merging this.

And then work on improvements in a follow-up.

There is also another open Issue mentioned in a FIX-ME comment in the code that should be tackled.

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Jul 14, 2025
@tortmayr tortmayr merged commit 38a37ac into master Jul 14, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Jul 14, 2025
@github-actions github-actions bot added this to the 1.64.0 milestone Jul 14, 2025
@tortmayr
Copy link
Contributor Author

I have created a follow-up ticket in: #16000

laemmleint pushed a commit to mvtecsoftware/theia that referenced this pull request Aug 18, 2025
Cleanup the session created by the `AgentDelegationTool` after the tool
invocation has completed i.e. the response from the newly created
session has been received.

Fixes eclipse-theia#15995
@ndoschek ndoschek deleted the tortmayr/issues/15995 branch December 5, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Delegated sessions form AgentDelegationTool are not cleaned up

2 participants