Repository navigation
feat(app): let agents settle and un-settle sessions from chat - #7083
Merged
Merged
Conversation
Add a session.settle command so an agent can move a finished session to its workspace's Settled row, or bring it back, the same way the sidebar does. It follows the sidebar's rules: OpenCode v2 workspaces with settledSessions on, idle top-level sessions only. Working sessions return target_working and sessions waiting on the person return the new target_waiting code. session.list_sessions now reports settled, and the v2 context bridge allows the command. Signed-off-by: Jalil <reachjalil@gmail.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Warden: advisory — no major findingsNo high or medium security findings and no confidentiality findings. Warden does not block merging or grant or withdraw approvals. Tests and human review remain separate requirements. Reviewed |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this about?
Agents can settle a finished session, or bring it back, when you ask in chat ("settle my finished chats").
What problem does it solve?
Settle was only in the sidebar. Agents could pin, rename and archive sessions but had no way to settle one.
What was the situation before?
Settled state is stored per device in the app, so the engine never sees it, and agents had no command for it.
How is this implemented?
session.settlecontrol action (sessionId,settled) insession-control-actions.ts. It calls the sidebar'ssettleSession/unsettleSession, so you get the same Undo toast.settledSessionsflag and OpenCode v2 workspaces (settleWorkspaceIds), root sessions that aren't archived, and the sidebar's session status. Working sessions returntarget_working. Sessions waiting on the person return the newtarget_waitingcode.session.list_sessionsentries now includesettled.session.settle, and the tool descriptions mention it.What else changed?
target_waitingadded toopenworkAffordanceFailureCodeSchema.Release note
You can ask an agent to settle or un-settle your chats.
Evidence
session-model-reassignment.test.tsxsettles, lists as settled, un-settles, and refuses working, waiting, archived and non-v2 sessions;opencode-v2-session-management.test.tsdiscovers and forwardssession.settle.