opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Unshare session remotely if container fails ungracefully

Open felixAnhalt opened this issue 2 months ago • 1 comments

Description

Our container died ungracefully and our catch wasn't triggered. We want to unshare the shared session. We have access to the full sessionId. We do not necessarily care about actually connecting to the session, we just want to unshare it.

Current behavior:

I try to connect to my session running in our ECS cluster via opencode --session <my-sessionId> and it throws Session not found <my-sessionId>.

Expected behavior: I can either connect to the session remotely or I am able to at least unshare sessions remotely in case of ungraceful exits via a command like opencode --session <my-sessionId> --unshare or something similar.

OpenCode version

1.0.35

Steps to reproduce

Create a session in a conatiner. Share the session programatically. Stop the container without unsharing inside it prior. Try to unshare the session.

Screenshot and/or share link

No response

Operating System

macOS 26.0.1

Terminal

Alacritty

felixAnhalt avatar Nov 07 '25 14:11 felixAnhalt

Also hitting this via the SDK. Called client.session.share() which created a share on opncd.ai, but client.session.unshare() fails with:

Resource not found: ~/.local/share/opencode/storage/share/ses_4ed1f9654ffeBz1QHu0dcbriWu.json

The local share directory is empty - shares go to the cloud but unshare looks locally.

Example still-live share I can't delete: https://opncd.ai/share/0dcbriWu

thisisryanswift avatar Dec 12 '25 14:12 thisisryanswift