anomalyco / anomalyco/opencode
Archiving a parent session leaves child/subagent sessions active
@jlongster is already working on this.
Since Aug 3, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Archiving a parent session does not archive its child/subagent sessions. The API updates only the requested session row, so children remain active even though their parent is archived.
This causes orphaned active child sessions in clients. A client can try to cascade itself, but session lists may be filtered or paginated, making a client-side cascade incomplete and nondeterministic.
Reproduction
- Create a parent session.
- Spawn one or more child sessions (
parentIDset). - Archive the parent with
PATCH /session/{id}andtime.archivedset. - Query the children or inspect storage.
The parent has time.archived; its children do not.
Current implementation
Session.setArchived calls patch(sessionID, ...) for one session. By contrast, Session.remove recursively loads and removes children(sessionID) first.
Observed in v1.18.10 and current dev source.
Expected
Please define and implement hierarchy-aware archive semantics, preferably one of:
- archive descendants recursively in the backend; or
- add an explicit
cascadeoption to the archive/update endpoint.
Unarchive semantics need an explicit decision so independently archived children are not unintentionally restored.
Related client symptom: https://github.com/openchamber/openchamber/issues/2266
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.