Repository navigation
Closed
Labels
2.0coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Tracking issue so the V1 event surface is removed deliberately, in one sweep, after V2 cutover. Collected while working #35021 (event audit), which intentionally deletes nothing V1.
Inventory to remove
Legacy definitions and manifests
packages/schema/src/v1/*legacy event definitions- Compatibility entrypoints that remain outside that subtree:
packages/schema/src/session-v1.tspackages/schema/src/filesystem-v1.tspackages/schema/src/legacy-event.tspackages/schema/src/permission-v1.tspackages/schema/src/question-v1.ts
- Core compatibility facades:
packages/core/src/v1/session.tspackages/core/src/v1/permission.ts
- Standalone V1-only event modules:
packages/schema/src/ide-event.ts(ide.installed), dead remnant of the old automatic IDE-extension install/toast flowpackages/schema/src/session-compaction-event.ts(session.compacted), superseded by current compaction lifecycle eventspackages/schema/src/project.ts(project.updatedlegacy event definition)packages/schema/src/lsp-event.ts(lsp.updated)packages/schema/src/mcp-event.ts(mcp.browser.open.failed), already excluded from the current MCP inventory but still published by V1
packages/schema/src/session-status-event.ts, V1-only and not inServerDefinitions; still published bypackages/opencode/src/session/status.ts. Its retry status union (attempt/message/action/next/isRetryable) is condemned vocabulary.EventManifestsession V1 splits (sessionV1Durable/sessionV1Live) and compatibility-only entries in the fullDefinitionsmap (packages/schema/src/event-manifest.ts)
Active compatibility bridges
EventV2Bridge(packages/opencode/src/event-v2-bridge.ts)- Current Core's remaining V1 durable bridge:
packages/core/src/session.tspublishessession.createdthroughSessionV1.Event.Createdpackages/core/src/session/projector.tsprojectssession.created,session.updated,session.deleted,message.updated,message.removed,message.part.updated, andmessage.part.removed
- V1 publishers for the standalone events above, including
packages/opencode/src/session/compaction.ts,project/project.ts,lsp/lsp.ts, andmcp/index.ts
Consumers to migrate or remove
packages/appV1 event consumers:src/context/global-sync/event-reducer.tssrc/context/server-session.tssrc/context/permission.tsxsrc/context/notification.tsxsrc/pages/layout.tsxpages/session/usage-exceeded-dialogs.tsx
- Current TUI transitional V1 subscribers:
packages/tui/src/app.tsxpackages/tui/src/feature-plugins/system/notifications.ts
- V1 CLI
runstream consumers once the V2 CLI replacesopencode run:packages/opencode/src/cli/cmd/run/noninteractive.tspackages/opencode/src/cli/cmd/run/stream-v2.transport.tspackages/opencode/src/cli/cmd/run/stream-v2.subagent.tspackages/opencode/src/cli/cmd/run/session-data.ts- associated tests
- V1 retry implementation once V2 runner retry matures (V2: port V1 LLM retry policy into opencode #35002):
packages/opencode/src/session/retry.tspackages/opencode/src/session/status.ts- retry paths in
packages/opencode/src/session/processor.ts
Generated surfaces and tests
- Regenerate or retire legacy event unions in:
packages/sdk/openapi.jsonpackages/sdk/js/src/v2/gen/types.gen.tspackages/sdk/js/src/gen/types.gen.tspackages/codemode/test/fixtures/opencode-v2-openapi.json
- Legacy contract tests:
packages/schema/test/legacy-event.test.tspackages/schema/test/v1-isolation.test.tspackages/core/test/legacy-event-schema.test.ts- V1 assertions in
packages/opencode/test/event-manifest.test.ts
Keep out of this sweep
mcp.tools.changedis an active internal V2 Core event.server.connectedis actively synthesized and consumed by current clients.vcs.branch.updated,installation.updated, andinstallation.update-availableare current public events.- Workspace/worktree lifecycle events and
global.disposedneed separate product decisions; they are not automatically obsolete just because their current implementation crosses legacy paths.
Notes
specs/v2/schema-changelog.mdstays historical; never rewrite old entries.- Blocked on V2 CLI replacing
opencode runandpackages/appmigrating to the V2 stream.
Metadata
Metadata
Assignees
Labels
2.0coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Activity
kitlangton commentedon Jul 23, 2026
Cutover requirement from #38367: remove persisted obsolete pre-release durable tool event rows, including
session.tool.success.1andsession.tool.failed.1, before V2 stable. The canonical tool-result migration intentionally rewrites onlysession_messageprojections and leaves these rows untouched for now, because no production path rebuilds projections from them and rewriting them adds substantial upgrade cost.When cleaning them up, preserve
event_sequencehigh-water marks (do not renumber later events), verify durable log reads tolerate the resulting sequence gaps, and make the non-replayable pre-cutover baseline explicit. Related retention work: #33356.neriousy commentedon Oct 21, 2026
Mostly done:
packages/opencodewas deleted, which removed EventV2Bridge, V1 retry/status and the run stream consumers, and #40382 and #43045 removed V1 compatibility from the app. Some V1 schema modules (schema/src/v1/*, legacy-event.ts, filesystem-v1.ts and others) and their entries in event-manifest.ts are still there. Closing this tracker. The remaining removal is mechanical cleanup.