anomalyco / anomalyco/opencode
App undo and fork replace reference paths with aliases
@Brendonovich is already working on this.
Since Aug 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the App, undoing a prompt or selecting it in the fork dialog restores a configured @reference with the alias as its attachment path instead of the resolved reference path.
The persisted file part contains both source.text.value (for example @docs) and source.path (for example /shared/company-docs). Prompt restoration currently derives the attachment path from the visible text whenever it starts with @, so the restored prompt points to <session>/docs. Submitting it again can attach the wrong directory or fail to attach the reference.
Plugins
None
OpenCode version
dev at 9f69463f1d556af2b5b51d2efa1c04f5f544f911
Steps to reproduce
- Configure a reference alias whose resolved directory is outside the active project, such as
docs->/shared/company-docs. - In the App, submit a prompt containing the selected
@docsreference. - Undo that prompt, or open the fork dialog and select it.
- Submit the restored prompt.
- Observe that the restored attachment path is
docs, resolved under the active project, instead of/shared/company-docs.
Screenshot and/or share link
Not applicable. The failure is deterministic in extractPromptFromParts: a file part with source.text.value = "@docs", source.path = "/shared/company-docs", and session directory /repo restores with path = "docs".
Operating System
All platforms
Terminal
Not applicable (App UI)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.