anomalyco / anomalyco/opencode

Web: quota recovery can delete the project registry

Open
#39,295 1 comment 1 reaction 1 assignee View on GitHub

@Hona is already working on this.

Since Jul 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The web persistence quota-recovery path evicts the largest opencode.* localStorage entries first. It does not protect opencode.global.dat:server, which stores the server list, open projects, last project, and recently closed projects.

When another persisted value hits the browser quota, recovery can delete this registry. After the next reload—especially noticeable in mobile/PWA browsers—the server is reconstructed from startup configuration, but projects disappear from the sidebar and must be added again. Replacing the registry itself can also delete the old value before a failed retry.

Reproduction
  1. Store a relatively large value at opencode.global.dat:server.
  2. Fill localStorage close to quota with another evictable opencode.* value.
  3. Persist a new value that triggers QuotaExceededError.
  4. Observe quota recovery remove the server registry as the largest candidate.
  5. Reload and observe the project list is gone.
Expected behavior

Quota recovery must preserve the server/project registry. If a registry replacement cannot be stored, the previous registry should remain intact.

Notes

This is an application-owned data-loss path independent of browser/OS origin-wide storage purging.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.