Skip to content

todowrite state persists across sessions after deleting Local Storage/leveldb #36401

Closed as not planned

Description

@yayator

Description

Description

Since updating OpenCode to the latest version (v1.17.18), the todowrite tool displays stale task items from previous conversations. After restarting OpenCode, the same old todo list reappears with incorrect completion counts (e.g., "3 de 6 completados") even when there are no active tasks. This did NOT happen before the update.

Steps to Reproduce

  1. Use todowrite in a conversation (creates some tasks)
  2. Close OpenCode
  3. Delete the following folders:
    • %APPDATA%\ai.opencode.desktop\Local Storage
    • %APPDATA%\ai.opencode.desktop\Session Storage
    • %APPDATA%\ai.opencode.desktop\blob_storage
    • %APPDATA%\ai.opencode.desktop\Cache
  4. Restart OpenCode
  5. Start a new session in the same project workspace
  6. The old stale todowrite items still appear with incorrect counters

Expected Behavior

Deleting local app data (Local Storage, Session Storage, blob_storage, Cache) and restarting should result in a fresh state with no stale todowrite items.

Actual Behavior

The stale todowrite items persist despite clearing all local storage directories.

Environment

  • OpenCode version: 1.17.18 (latest)
  • Platform: Windows 10
  • Model: big-pickle
  • Additional info: The same session ID (ses_0c5403cf1ffe18TZOJSthEdKAG) is restored even after clearing all app data directories. Todo state appears to be restored from somewhere outside the standard Local Storage / IndexedDB locations.

Additional Context

The file opencode.global.dat contains a sessionView entry that references todoCollapsed:false, suggesting the session restore mechanism may re-hydrate todowrite state from the conversation history or from an external source not cleared by deleting Local Storage. This behaviour started after updating to v1.17.18.

Plugins

None

OpenCode version

latest

Steps to reproduce

  1. Use todowrite in a conversation (creates some tasks)
  2. Close OpenCode
  3. Delete the following folders:
    • %APPDATA%\ai.opencode.desktop\Local Storage
    • %APPDATA%\ai.opencode.desktop\Session Storage
    • %APPDATA%\ai.opencode.desktop\blob_storage
    • %APPDATA%\ai.opencode.desktop\Cache
  4. Restart OpenCode
  5. Start a new session in the same project workspace
  6. The old stale todowrite items still appear with incorrect counters

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Activity

  1. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions