Skip to content

V2: workspace artifacts with local preview and optional publishing #35318

Open

Description

@opencode-agent

Summary

OpenCode sessions often produce work that is worth preserving, refining, and sharing separately from the conversation that created it. Explore first-class workspace artifacts: durable user- or agent-authored files that can be edited locally, previewed through OpenCode, and optionally published to the team.

The artifact should remain a normal workspace file rather than being coupled to a chat command or trapped inside session history.

Possible shape

  • Use a conventional local directory such as .opencode/artifacts/.
  • Start with Markdown files that users and agents edit through normal file operations.
  • Let the local OpenCode server discover and render artifacts while it is running.
  • Support standard Markdown plus extensible presentation blocks for diagrams, code references, and other structured content.
  • Keep local artifacts private by default; publishing is an explicit action or tool call.
  • Publish to Console with a stable URL, team visibility, and version history when the same artifact is updated.
  • Make published artifacts discoverable through Console search and an agent/plugin search tool.
  • Snapshot any referenced local content needed for a published revision rather than exposing the creator's filesystem.
  • Allow local files to participate in ordinary project version control independently of published revisions.

This does not need to begin with /share. An artifact could be created and edited at any point during normal work, previewed locally whenever useful, and published only when it becomes useful to someone else.

Questions

  • Should artifacts be scoped to a project, workspace, user, or some combination?
  • Is .opencode/artifacts/ the right convention, and does each artifact need metadata beyond its file path?
  • Should local rendering always be available while the server runs, or require an explicit opt-in?
  • Which formats and custom Markdown blocks should the first version support?
  • How should local file and code references be captured safely when publishing?
  • Does republishing update one stable artifact with revisions, or create a new publication?
  • What visibility, retention, ownership, and deletion rules should published artifacts have?
  • What is the smallest useful tool/API surface for agents to preview, publish, update, and search artifacts?

Context

Motivating discussion: https://discord.com/channels/1391832426048651334/1522962474163241002

Activity

  1. solcoteh commented on Aug 3, 2026

    @solcoteh

    I really like the idea of keeping Artifacts as normal files inside the workspace.

    What would make this especially useful for me is a dedicated Artifacts panel in OpenCode Desktop. Important outputs created during a session—such as reports, Markdown documents, HTML pages, images, diagrams, or code files—could automatically appear there.

    The panel could provide a preview, open or reveal the original file, and allow the user to attach an Artifact to another message.

    The files should remain normal local files, while the Artifact panel acts as an easier way to find and manage the important results of a session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions