opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(acp): persist session state to disk and add isReplay metadata

Open myInstagramAlternative opened this issue 2 weeks ago • 0 comments

Note: This was vibe-coded (using sst/opencode tho), sorry! I know that this is a lot but I'd appreciate if you would consider this, it is a per-requisite for https://github.com/BloopAI/vibe-kanban/pull/1717

Fixes session resumption when the ACP process restarts:

  • Persist ACP session state to ~/.local/share/opencode/storage/acp_state/
  • Restore session from disk when not found in memory
  • Make session manager methods async to support disk I/O

Add isReplay metadata to session updates during history replay:

  • Mark all sessionUpdate notifications with _meta.isReplay: true when replaying session history via loadSession
  • Allows ACP clients to filter/handle replay events differently

Happy and prosperous 2026!

myInstagramAlternative avatar Jan 01 '26 07:01 myInstagramAlternative