Description
OpenCode can assign the same project_id to unrelated repositories when those repos are bare git dirs under the same parent directory (for example, multiple *.git repos under one org folder). This causes session history to mix across repos, and opencode -c may continue a session from a different repository.
Plugins
None
OpenCode version
v1.2.27 (also observed in newer builds before fix)
Steps to reproduce
- Create two different repositories with different root commits.
- Create bare mirrors under the same parent directory (e.g.
/path/org/repo-a.git and /path/org/repo-b.git).
- Create worktrees from each bare repo.
- Run OpenCode in worktree A, then in worktree B.
- Observe
project_id cache behavior / session listing (-c) crossing repo boundaries.
Screenshot and/or share link
N/A
Operating System
Linux
Terminal
PTY (CLI)
Description
OpenCode can assign the same
project_idto unrelated repositories when those repos are bare git dirs under the same parent directory (for example, multiple*.gitrepos under one org folder). This causes session history to mix across repos, andopencode -cmay continue a session from a different repository.Plugins
None
OpenCode version
v1.2.27 (also observed in newer builds before fix)
Steps to reproduce
/path/org/repo-a.gitand/path/org/repo-b.git).project_idcache behavior / session listing (-c) crossing repo boundaries.Screenshot and/or share link
N/A
Operating System
Linux
Terminal
PTY (CLI)