[BUG] Artifact CDN serves stale cached version — updates via routine/Artifact API not visible to viewers
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have a Claude Code routine ("Daily Intel Brief — Website Update") that runs daily at 7:00 AM and publishes updated HTML content to an artifact via the url parameter (updating an existing artifact in-place).
The routine completes successfully and the Artifact API confirms the update (artifact metadata shows the correct updated timestamp, and WebFetch against the artifact URL returns the latest HTML with new content). However, when viewers open the artifact URL in a browser, Cloudflare's CDN serves a stale cached version.
Evidence:
- Artifact ID:
18415201-f672-4a8c-96fd-7b714a061c6a - The artifact iframe loads from
*.frame.claudeusercontent.com/_f/{version_hash}/ - The iframe URL was pinned to version snapshot
1785579864(= 2026-08-01 10:24 UTC) despite the artifact being updated on Aug 2 and Aug 3 - Raw HTTP requests to the artifact URL return
cf-cache-status: HIT, confirming Cloudflare is serving the page from its own edge cache rather than fetching the latest version WebFetch(which bypasses the CDN) returns the correct, up-to-date content with Aug 2 and Aug 3 sections- The browser renders the stale Aug 1 version until a hard refresh (Ctrl+Shift+F5) is performed, and even that is inconsistent
Reproduction:
- Create an artifact and note its URL
- Set up a routine that updates the artifact daily using
Artifact(url=...)to republish - Wait for the routine to run and confirm it completes successfully
- Open the artifact URL in a browser — the old content is displayed
- Check the iframe src: the version hash in the
/_f/{hash}/path points to the old snapshot - Hard refresh (Ctrl+Shift+F5) sometimes loads the new version, sometimes doesn't
This appears to be a cache invalidation issue — when an artifact is republished, the CDN edge cache is not being purged for the old version URL, so viewers continue to see stale content.
What Should Happen?
When an artifact is updated via a routine or the Artifact API, the CDN should immediately serve the latest published version to all viewers. The /_f/{version_hash}/ path in the iframe should resolve to the most recently published snapshot, not a stale cached copy.
Viewers should see updated content without needing to hard-refresh or clear site data.
Error Messages/Logs
Artifact iframe URL (stale):
https://18415201-f672-4a8c-96fd-7b714a061c6a.frame.claudeusercontent.com/_f/1785579864-6d03/?__frame
Version hash 1785579864 converts to: 2026-08-01 10:24 UTC
HTTP response header on artifact page: cf-cache-status: HIT
Artifact metadata via API shows: updated 2026-08-03 (correct)
WebFetch returns: full HTML with Aug 2 and Aug 3 content (correct)
Browser renders: only content up to Aug 1 (stale)
Steps to Reproduce
- Create an artifact via Claude Code (e.g. a daily news briefing page)
- Note the artifact URL:
https://claude.ai/code/artifact/{uuid} - Set up a Claude Code routine that updates this artifact daily using
Artifact(url="{artifact_url}", file_path="...")to republish new content - Let the routine run — it completes successfully and the artifact metadata shows the updated timestamp
- Open the artifact URL in a browser — stale content from a previous version is displayed
- Inspect the iframe
srcattribute:*.frame.claudeusercontent.com/_f/{version_hash}/— the version hash points to an old snapshot WebFetchagainst the same artifact URL returns the correct, latest content — confirming the artifact is updated server-side, but the CDN is serving a cached old versionCtrl+Shift+F5hard refresh sometimes loads the new version, sometimes doesn't
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
N/A — issue is in artifact CDN layer, not CLI. Routine runs on Claude Code cloud.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_