[BUG] Artifact CDN serves stale cached version — updates via routine/Artifact API not visible to viewers

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 3, 2026

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:

  1. Create an artifact and note its URL
  2. Set up a routine that updates the artifact daily using Artifact(url=...) to republish
  3. Wait for the routine to run and confirm it completes successfully
  4. Open the artifact URL in a browser — the old content is displayed
  5. Check the iframe src: the version hash in the /_f/{hash}/ path points to the old snapshot
  6. 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

  1. Create an artifact via Claude Code (e.g. a daily news briefing page)
  2. Note the artifact URL: https://claude.ai/code/artifact/{uuid}
  3. Set up a Claude Code routine that updates this artifact daily using Artifact(url="{artifact_url}", file_path="...") to republish new content
  4. Let the routine run — it completes successfully and the artifact metadata shows the updated timestamp
  5. Open the artifact URL in a browser — stale content from a previous version is displayed
  6. Inspect the iframe src attribute: *.frame.claudeusercontent.com/_f/{version_hash}/ — the version hash points to an old snapshot
  7. WebFetch against the same artifact URL returns the correct, latest content — confirming the artifact is updated server-side, but the CDN is serving a cached old version
  8. Ctrl+Shift+F5 hard 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_

View original on GitHub ↗