OmniscioGuidesClaude Code artifacts
Claude Code artifacts: publishing a session's output
An artifact is what Claude Code produces when terminal text is the wrong shape for the answer: a page you open in a browser, with the diff, the chart or the comparison laid out where you can look at it instead of reading it line by line.
This page covers what an artifact is and is not, how to ask for one, when Claude Code stops to ask you first, how updates and sharing work, what a page can and cannot do, and the four ways to turn the feature off.
Last checked against Anthropic's Claude Code documentation on November 20, 2026. By the Omniscio team. Updated .
What an artifact is
Anthropic defines an artifact as a live, interactive web page that Claude Code publishes from your session to a private URL on claude.ai. You open it in a browser, and it updates in place as the session continues.
It is worth using when the output is easier to look at than to read. Anthropic's examples are a pull request walked through with annotated diffs, a dashboard rendered from data the session already pulled, design options laid side by side, an investigation timeline that fills in while a long task runs, or a link sent to a teammate instead of a wall of pasted text. Claude builds the page from anything the session can reach, including your codebase and data it pulls through connected tools.
What it is not, in Anthropic's words, is a hosted tool. An artifact is one self-contained page with no backend, so it cannot serve multiple routes. For an internal tool with a backend, the advice is to deploy it on your own infrastructure.
Sources: the introduction, "When to use an artifact" and "What an artifact is not" in Share session output as artifacts, read November 20, 2026.
Ask for one
Claude may publish an artifact on its own when the output suits a page, or you can ask directly. Name the feature or describe the visual output you want; Anthropic's own two examples are short sentences rather than instructions.
Make an artifact that walks through this PR with the diff annotated inline.Unless you name a location, Claude writes the page to an HTML or Markdown file in a temporary directory outside your project, then publishes it. The artifact stays private to you until you share it. After the first publish, Claude prints the URL and your browser opens to the new page.
Three controls make it easier to live with:
Ctrl+]reopens the session's most recent artifact at any time.- A
⧉pill below the prompt shows the artifact's name, or a count when there are several. In fullscreen rendering, clicking it opens the/artifactslist. CLAUDE_CODE_ARTIFACT_AUTO_OPEN=0stops the browser from opening.
Claude picks the page's title and a browser-tab icon that matches what the page is. You can ask for a specific title or icon in the same request. If you sent the prompt through Remote Control from claude.ai or the Claude mobile app, no tab opens on the machine running the session; the browser opens there the next time Claude publishes from a prompt you typed at the terminal.
If Claude says it cannot publish, or writes a local HTML file without a link, artifacts are not enabled for that session. The Remote Control guide covers the surface it came from; the section below covers the conditions.
Sources: "Create an artifact" in Share session output as artifacts, read November 20, 2026.
When Claude Code asks before publishing
A new artifact published in response to a prompt you type goes through without a permission prompt or a classifier review. Anthropic lists the cases where it does ask, or where auto mode's classifier reviews the publish instead:
- The session is in plan mode, for the first publish of each artifact.
- The publish declares runtime capabilities for the page, such as connector calls or a file download.
- You shared the artifact publicly: it asks at least once per conversation before changing it, and before each reply to a comment.
- The publish happens in a turn a session-scoped scheduled task started, rather than a prompt you typed.
- Claude cannot read the file without your approval. An allow rule for the
Artifacttool does not skip this one. - In Manual or
acceptEditsmode, Claude makes a small change to a file it cannot edit without approval. You are asked even when an allow rule covers theArtifacttool, because the edit is what needs the approval.
If a publish prompt carries a sentence such as Also makes 1 edit to that file on disk., Claude is changing the artifact's file and publishing it in one step. Approving publishes the page and then writes the change to your file.
Source: "When Claude Code asks before publishing" in Share session output as artifacts, read November 20, 2026.
Update it, and find it again
Ask Claude to revise the page and it edits the underlying file and publishes again to the same URL. Anyone with the page open sees the update in place, and each publish becomes a version you can choose from the Share control in the page header.
A different session creates a new artifact unless you tell it which one you mean. Give Claude the artifact's URL, or attach it from /artifacts.
/artifacts lists the artifacts you own and the ones shared with you, with the current session's first under This session. Select one and press Enter to open or attach it, o to open it in the browser, c to copy its link, or d to delete an artifact you own outside a cloud session. The list is read from your claude.ai account, so it works in a new session and after /clear.
A one-step update is a small change Claude makes to the artifact's file as part of a publish instead of through an edit tool call. To turn those off, set CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS to 0 in the env block of your settings and relaunch, because a running session does not reread the variable.
Sources: "Update an artifact", "Turn off one-step artifact updates" and "Find an artifact again" in Share session output as artifacts, read November 20, 2026.
What a page can and cannot do
Claude Code wraps the published file in an HTML document shell and serves it under a strict Content Security Policy. Anthropic's constraint table is the useful part, because it explains most failures:
- External requests are limited. The page can load typefaces from Google Fonts and scripts from five public CDN hosts: cdnjs, unpkg, the Tailwind and jQuery CDNs, and selected paths on jsDelivr such as
/npm/. Every other external image, script, stylesheet and font is blocked, andfetch, XHR and WebSocket calls can reach only the page's own origin and the Google Fonts hosts. - No backend. It is a static page and it cannot authenticate viewers itself.
- Downloads need declaring. The page cannot start a download on its own; Claude declares a downloads capability when a viewer should be able to save a file the page generates.
- The source must be
.html,.htmor.md, decoded as UTF-8 or as little-endian UTF-16 by its byte-order mark, with no replacement characters. - A file on a network share is refused without being read.
- The rendered page must be 16 MiB or smaller. Large embedded images are the usual cause when a publish fails for size.
Generating an artifact uses output tokens like any other response, and Anthropic notes that a styled page is more token-intensive than the same content as terminal text, with inline CSS, interactive JavaScript and images embedded as data URIs the main contributors. Its three suggestions are to prefer SVG or HTML and CSS over embedded raster images, to omit interactivity you do not need, and to have the page summarize large datasets rather than inline them.
Sources: "Page constraints" in Share session output as artifacts, read November 20, 2026.
When artifacts are available
Every condition below has to hold. When one does not, Claude writes a local HTML file or says it cannot publish. Anthropic's table:
- Plan. Pro, Max, Ultra, Team or Enterprise.
- Authentication. The session is backed by a claude.ai account, signed in with
/login. A session using an API key, a gateway token or a cloud-provider credential cannot publish. - Model provider. The Anthropic API. Not Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.
- Organization policy. No customer-managed encryption keys, HIPAA configuration or Zero Data Retention.
- Surface. The CLI, or the Claude desktop app version 1.13576.0 or later. Off by default in the Agent SDK, the GitHub Action, MCP-server contexts,
-pruns from your own terminal or scripts, and sessions withCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICset.
Whether artifacts are allowed comes from your organization's policy, which Claude Code loads from api.anthropic.com. When it cannot load the policy, artifacts are unavailable and Claude says why. If a proxy, VPN or web filter is involved, Anthropic's advice is to have an administrator let api.anthropic.com through; Claude Code keeps retrying in the background.
Source: "Availability" in Share session output as artifacts, read November 20, 2026.
Turn artifacts off
Four routes, from Anthropic's "Disable artifacts" table:
- Turn the Artifacts row off in
/config, which writes"enableArtifact": falseto your user settings. - Set
"enableArtifact": falsein a settings file. The deprecated"disableArtifact": truealso works. - Set
CLAUDE_CODE_DISABLE_ARTIFACT=1. - Add
Artifacttopermissions.deny.
One asymmetry matters in a shared repository. A project's .claude/settings.json or .claude/settings.local.json can set "enableArtifact": false for sessions in that project, but setting it to true there does not turn artifacts back on. Once artifacts are off through a --settings file, CLAUDE_CODE_DISABLE_ARTIFACT, or managed settings, no settings file turns them back on. Honouring the key in project and local settings needs Claude Code v2.1.242 or later.
A WebFetch deny or ask rule with no domain: part does not turn artifacts off or block artifact reads. A WebFetch(domain:claude.ai) rule in deny or ask does apply to artifact reads.
Source: "Disable artifacts" in Share session output as artifacts, read November 20, 2026.
Where these answers come from
- Everything on this page: Share session output as artifacts, read November 20, 2026.
- The fullscreen
⧉pill and the/artifactslist: Fullscreen rendering, read the same day.
No artifact was published from this site's machine to check the page: every claim is quoted from Anthropic's documentation, which changes with releases.
Common questions
Does an artifact cost extra?
No separate charge is documented. Anthropic says generating one uses output tokens like any other response, and that a styled page costs more tokens than the same content as terminal text.
Can I edit an artifact myself?
Only where the page came from a template: its link opens the template's own editor on claude.ai. Otherwise you ask Claude for the change, or your organization gives you the editor role on the page.
Where is the artifact's file?
By default, in a temporary directory outside your project. Name a path in your request if you want the file somewhere you keep.
Where does the /artifacts list come from?
Your claude.ai account. Claude Code reads the list from there rather than from the session, which is why it works in a new session and after /clear, when an artifact's link has scrolled out of the terminal.