Skip to content

[BUG] Artifact tool: list with scope: "files" stops at 1024 paths and cannot continue, so files past the first 1024 can't be found #109204

Open

Description

@jochristianto

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

The built-in Artifact tool's action: "list" with scope: "files" returns at most 1024 paths, in path order, then ends with:

… and 914 more files not shown; a read by path works for any published path you know by name

There is no way to get the rest. after and limit are refused for this scope (see the error below), although after already continues a listing for scope: "assets". So in Claude Code, any file past the 1024th path can be reached only by guessing its exact name.

This hits Migrated Design artifacts (a standalone Claude Design project moved into claude.ai) hard:

  • The type allows 4,096 files per canvas, so 1024 is easy to pass. Ours has 1,938 files.
  • The listing is sorted by path. Every root page whose name starts with [ (for example [GENERAL] Login.html) sorts after folders whose names start with a capital letter, so it falls past the cutoff. In our canvas every bracketed root page is hidden.
  • The type's page list, project/compat.json, is written at the move and is not updated when a page is added later in the editor. A page added after the move is shown in the editor's page menu but in no file the tool can list.
  • A read by exact path works for every hidden file. Only the names are unreachable.

We mirror the canvas into a git repo with a script that lists the files, then reads them by path (sha256-checked). With this cap, the script cannot see new pages or new assets that no other file links to. One new page was found only because someone saw it in the editor's page menu and typed its name.

What Should Happen?

list with scope: "files" should return every path, or let a caller continue past the first page, for example:

  • accept after (a cursor from the previous listing), as scope: "assets" already does, or
  • accept a path prefix (for example project/[), so a caller can list one part of the tree at a time.

The editor's "All project files" view already shows every file, so the data exists.

Error Messages/Logs

Listing (first and last rows, trimmed):

Published files of https://claude.ai/artifact/<id> (version <version>), 1938 files by path — read one with action "read" and its `path` [...]
- "SKILL.md"  text/markdown  10839 bytes
[...]
- "project/S…/02_flows/…/02_….png"  image/png  159502 bytes
- … and 914 more files not shown; a read by `path` works for any published path you know by name

Trying to continue the listing:

{ "action": "list", "scope": "files", "url": "https://claude.ai/artifact/<id>", "after": "<cursor>", "limit": 5 }
list with `scope: "files"` takes only `url` — remove limit, after.

Reading a hidden root page by its exact name works:

- "project/[TEST] Example.html" saved (5420 bytes, "text/html", sha256 …)

A read of a wrong name points to an action this tool doesn't have:

- "project/[TEST] Example2.html" not read — file read failed: no file is published at that path in the served version — action "list_files" shows the paths

list_files is a tool of the claude-artifacts MCP server (see #106268), which is not present in these sessions and which refuses typed artifacts anyway.

Steps to Reproduce

  1. Sign in to Claude Code with a claude.ai account.
  2. Have a Migrated Design artifact with more than 1024 files (a Claude Design project moved to claude.ai). Give it a root page whose name sorts late, for example [TEST] Page.html, and add that page after the move from the editor.
  3. Call Artifact with {"action": "list", "scope": "files", "url": "<artifact url>"}. The page is not listed. The response ends with "… and N more files not shown".
  4. Call it again with "after" or "limit". It is refused: "takes only url".
  5. Read project/compat.json by path. The page added after the move is not in its pages.
  6. Read project/[TEST] Page.html by path. It is returned. The page exists but can be found only by its exact name.

The same happens with the artifact's claude.ai/code/artifact/<uuid> link: the listing names the same artifact and stops at the same path.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.322 (Claude Code)

Platform

Other (claude.ai sign-in)

Operating System

macOS 27.2

Terminal/Shell

Warp, zsh

Additional Information

Related:

The Compliance API's content?multi_file_format=zip download returns every file, but it needs a Claude Enterprise compliance key, which most Claude Code users do not have.

Also sent through /bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsbugSomething isn't workingplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions