[FEATURE] Allow headless (claude -p) sessions to publish and update Artifacts

Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 0 comments · opened Oct 6, 2026

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

Headless claude -p sessions don't get the Artifact tool, so a scheduled job can't keep a published artifact up to date. I have a job that rebuilds a dashboard's data file every day. Today the dashboard only updates when someone opens an interactive session afterwards and publishes it.

Proposed Solution

Make the Artifact tool available in claude -p sessions, at least for updating an artifact the account already owns (publish with url). An explicit opt-in, such as a flag or a settings entry, would be fine.

Alternative Solutions

My current workaround is a SessionStart hook. It checks whether the data file is newer than a "last published" marker and, if so, tells the next interactive session to publish. It works, but the publish runs in whatever session I open next, even one about something unrelated, and the dashboard stays stale on days I don't open a session.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

  1. A local scheduler runs claude -p at a fixed time each day.
  2. The job queries a data source and writes a fresh data.js for an existing artifact.
  3. The job publishes the page and data.js to the artifact's existing URL, so viewers see today's numbers without anyone opening a session.

Additional Context

  • Claude Code 2.1.280, macOS.
  • When asked whether a tool named Artifact was available, a claude -p session said no. The same account has the tool in interactive sessions.

View original on GitHub ↗