anomalyco / anomalyco/opencode

CLI server cannot enable durable event persistence

Open
#42,839 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

ServerOptions supports events.persist, but opencode2 serve does not expose it through its runtime configuration. Packaged CLI servers therefore always use the default persist: false, even with a persistent database.

Steps to reproduce
  1. Start opencode2 serve with OPENCODE_DB pointing to a file.
  2. Create a session.
  3. Stop the server and inspect or replay the session event log.
  4. The event sequence advances, but durable event payload rows were not retained.
Expected behavior

Provide a CLI-server configuration option for the existing events.persist server setting.

OpenCode version

0.0.0-dev-17472

Operating system

macOS and Linux

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.

Research direction

Start by tracing the runtime configuration used by opencode2 serve and compare it with ServerOptions, focusing on the existing events.persist setting. Verify the behavior with a file-backed OPENCODE_DB, then confirm that the CLI server can enable durable event persistence and that event payload rows survive a restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.