session_delete
Delete a gateway session by ID to remove its record and free associated resources. Confirmation is immediate; worktree cleanup runs asynchronously with safe retry handling.
Instructions
Delete a gateway session record by ID. The tool result confirms record deletion; worktree cleanup observers run asynchronously and may still be in progress. Worktree cleanup runs on the processing host for file-backed and PostgreSQL session managers. Both managers stage a caller-hidden cleanup tombstone before cleanup runs and retain a failed removal for retry by the host that owns the worktree, finalizing the record only once Git no longer registers the worktree, read back rather than inferred from the recorded path being absent. File-backed TTL eviction uses the same tombstone retry path. Deletion processed by a different host removes no worktree and leaves the owning host's record intact. The database-side cleanup_expired_sessions function stages the same tombstone instead of deleting a worktree-bearing session; it invokes no gateway observer and so attempts no removal itself. A tombstone is not bounded by retention.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID |