[FEATURE] Forward the URL fragment into published artifacts so they can be deep-linked
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Published artifacts cannot be deep-linked. A fragment on the artifact URL (https://claude.ai/artifact/<id>#some/route) never reaches the page, so an artifact that routes by #hash always opens at its default view.
The page cannot recover it:
- It renders in a cross-origin iframe, and the host page's
location.hashis not carried into the frame's URL. top.locationis cross-origin, anddocument.referrernever includes a fragment.- None of the runtime capabilities (
claude.use(...)) expose the host URL, query or fragment.
So there is no way for the artifact to learn where the link pointed.
Proposed Solution
Forward the host URL's fragment (and ideally the query string) into the artifact frame, e.g. by appending it to the iframe src. Keep it in sync: update the frame's hash on hashchange in the host, and optionally reflect the frame's hash back into the address bar so that copying the URL gives a working deep link.
Passing the fragment through needs no new API: pages that already route by hash would just start working.
Alternative Solutions
- A read-only runtime value (the current host fragment plus a change event) would also work.
- Today I link to the source file on GitHub instead of the rendered artifact, or tell the reader where to navigate once it opens.
- Publishing each view as its own artifact gives a per-document link but not a per-section one, and multiplies artifacts that drift apart.
Priority
Medium - Would be very helpful
Feature Category
Other
Use Case Example
- I publish a repository's documentation as one artifact that routes by
#hash. - A Claude Code session comments on a GitHub issue and wants to point a reviewer at one specific document and section in that artifact.
- It links
https://claude.ai/artifact/<id>#that/document@section. - Today the reviewer lands on the home view. With this feature they would land on the section the link names.
Additional Context
Artifact published from Claude Code (desktop app, Windows) and viewed at claude.ai/artifact/<id> in Chrome.