Skip to content

Persist OpenCode session data with bind mounts#8

Merged
fjmrytfjsn merged 2 commits intomainfrom
chore/session-persistence-pr
Apr 12, 2026
Merged

Persist OpenCode session data with bind mounts#8
fjmrytfjsn merged 2 commits intomainfrom
chore/session-persistence-pr

Conversation

@fjmrytfjsn
Copy link
Copy Markdown
Owner

@fjmrytfjsn fjmrytfjsn commented Apr 12, 2026

概要

  • OpenCode の永続データを named volume から bind mount に変更
  • ~/.opencode(設定)だけでなく、~/.local/share/opencode(セッションDB)と ~/.claude(ECC DB)も永続化対象に追加
  • ローカル環境での移行・確認手順ドキュメントを追加

背景 / 原因

  • 既存構成では opencode-data volume が優先され、期待していたホスト側ディレクトリとの同期になっていなかった
  • そのためリビルド時にセッション継続性が不安定だった

変更ファイル

  • .devcontainer/devcontainer.json
  • .devcontainer/docker-compose.yml
  • .gitignore
  • docs/SESSION_PERSISTENCE_FIX.md
  • docs/SESSION_DATA_PERSISTENCE_COMPLETE.md

確認観点

  • /home/vscode/.opencode が bind mount であること
  • /home/vscode/.local/share/opencode が bind mount であること
  • /home/vscode/.claude が bind mount であること
  • リビルド後もセッション関連データが保持されること

Switch DevContainer/OpenCode storage from named volumes to bind mounts for ~/.opencode, ~/.local/share/opencode, and ~/.claude; update ignore rules and add migration/diagnostic docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fjmrytfjsn fjmrytfjsn added the enhancement New feature or request label Apr 12, 2026
Initialize ownership for /home/vscode/.local and ~/.opencode before uv install and ECC setup so CI/devcontainer postCreate works with bind mounts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fjmrytfjsn fjmrytfjsn merged commit 3f8b621 into main Apr 12, 2026
1 check passed
@fjmrytfjsn fjmrytfjsn deleted the chore/session-persistence-pr branch April 12, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant