You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2 regression: explicitly attached reference loses its resolved path #41443
In V2, explicitly selecting a configured reference with @alias attaches its root directory listing, but the agent does not receive the reference's resolved checkout path. The agent therefore cannot reliably read files inside the reference.
The same configuration works in V1. After selecting @harness-engineering, the V1 agent reads files directly from the cached repository under:
In V2, the reference is displayed as a directory and its root listing is attached, but the agent may incorrectly look for harness-engineering inside the active project.
The missing description is intentional. The reference should only enter context when explicitly selected, not be advertised in every agent prompt.
Adding a description makes V2 inject the reference's resolved path into the system prompt, and follow-up reads then work. This workaround changes the intended behavior because the reference becomes part of the system prompt.
Explicitly selecting a reference should preserve its resolved path for that request without requiring a description.
Plugins
None
OpenCode version
opencode2 v0.0.0-next-17055
The same configuration works in OpenCode V1.
Steps to reproduce
Configure a Git reference without a description.
Start OpenCode V2 in the configured project.
Select the reference using @alias.
Ask the agent to inspect or summarize the reference.
Observe that the root listing is attached, but the agent cannot locate files inside the cached repository.
Add a description to the reference and repeat. The resolved path is added to agent guidance and the reads work.
Repeat without a description in V1. The agent reads files directly from the resolved reference checkout.
Addressed by #41789. V2 canonical message lowering now decodes durable local file: source URIs and includes the resolved directory path in reference context while preserving the attachment content and alias. Focused prompt and provider-boundary tests cover the reference-shaped directory case on POSIX and Windows. Closing as resolved on the v2 branch.
Activity
opencode-agent commentedon Aug 12, 2026
Addressed by #41789. V2 canonical message lowering now decodes durable local
file:source URIs and includes the resolved directory path in reference context while preserving the attachment content and alias. Focused prompt and provider-boundary tests cover the reference-shaped directory case on POSIX and Windows. Closing as resolved on the v2 branch.