Unshare session remotely if container fails ungracefully #2666

Open
opened 2026-02-16 17:36:43 -05:00 by yindo · 1 comment
Owner

Originally created by @felixAnhalt on GitHub (Nov 7, 2025).

Originally assigned to: @thdxr on GitHub.

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 and it throws Session not found .

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 --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

Originally created by @felixAnhalt on GitHub (Nov 7, 2025). Originally assigned to: @thdxr on GitHub. ### 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
yindo added the bug label 2026-02-16 17:36:43 -05:00
Author
Owner

@thisisryanswift commented on GitHub (Dec 12, 2025):

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 commented on GitHub (Dec 12, 2025): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2666