#session.delete
1 messages · Page 1 of 1 (latest)
Yep, with one important detail: the method is sessions.delete (plural), not session.delete.
- Gateway API: yes, via the Gateway WS/RPC protocol
{ "method": "sessions.delete", "params": { "key": "agent:main:subagent:...", "deleteTranscript": true } } - What it does: removes the session entry and archives the transcript as
*.deleted.<timestamp>. So it is not a hard shred/purge. - Limit: it will not delete the main session.
For the GUI:
- Control UI: yes. There’s a Sessions view where you can select session(s) and hit Delete.
- Regular webchat UI: no. Webchat clients are blocked from patch/delete session mutations, but Control UI is allowed.
Since you mentioned spawned sub-agents, you may also want to avoid manual cleanup entirely:
sessions_spawn(..., cleanup: "delete")to archive/delete right after announce- or tune
agents.defaults.subagents.archiveAfterMinutes
Docs:
- https://docs.openclaw.ai/gateway/protocol
- https://docs.openclaw.ai/web/control-ui
- https://docs.openclaw.ai/tools/subagents
If you want, paste openclaw --version and I can tell you whether your build should already have the Control UI delete flow.
Can't find delete button in control UI sessions page
Yeah, it’s a bit hidden right now.
In Control UI → Sessions, the Delete button only appears after you select at least one session:
- go to Sessions
- use the checkbox in the far-left column for a session row
- a bulk action bar appears above the table
- then you’ll see Delete
So there is no always-visible per-row delete button at the moment, only the bulk action.
If you don’t see the checkbox column at all, please paste:
openclaw --version
because that likely means you’re on an older build and the UI action may not be there yet.
Docs: https://docs.openclaw.ai/web/control-ui
If you want, I can also give you the exact sessions.delete WS payload to use as a fallback.
Got it thx
Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
That helps Answer Overflow index it for the next person.