Skip to content

[Bug]: Claude's Artifact tool is never registered in T3 Code sessions #7452

Closed

Description

@XDGFX

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open any thread in T3 Code using the Claude provider.
  2. Ask the agent to publish an artifact — "publish this as an artifact", or have it search its own
    tools for one.
  3. It reports that it has no Artifact tool.

The same account, using the same claude binary from a terminal, has the tool.

Expected behavior

Claude's Artifact tool is available in T3 Code, as it is when the CLI is run directly. If it is
deliberately withheld, some way to turn it on from T3 Code's settings, and something the agent can
say about why it is missing.

Actual behavior

The tool is never registered, so it does not exist rather than being denied: it is absent from
tool search, no permission rule can reach it, and neither the agent nor the user gets any
diagnostic. Nothing in T3 Code's Claude settings affects it.

The cause is the SDK spawn. T3 Code launches the CLI through
@anthropic-ai/claude-agent-sdk, which sets CLAUDE_CODE_ENTRYPOINT=sdk-cli, and Claude Code
2.1.235 treats SDK entrypoints as artifacts-off by default:

// isArtifactSdkDefaultOff() is true for sdk-cli
if (!truthy(env.CLAUDE_CODE_ARTIFACT) && isArtifactSdkDefaultOff()) return false;

isArtifactToolRegistered() therefore returns false. CLAUDE_CODE_ARTIFACT is the documented
opt-back-in; CLAUDE_CODE_DISABLE_ARTIFACT and the disableArtifact setting still hard-off it
either way, so the kill switch is unaffected by setting it.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Alpha) 0.0.33

Environment

macOS 26.6.1, Claude Code 2.1.235, @anthropic-ai/claude-agent-sdk 0.3.226, Bun 1.3.13, Claude
provider (Opus)

Logs or stack traces

# no Artifact tool
$ claude -p "List your tool names." --model claude-haiku-4-5-20251001 | grep -c Artifact
0

# Artifact tool present
$ CLAUDE_CODE_ARTIFACT=1 claude -p "List your tool names." --model claude-haiku-4-5-20251001 | grep -c Artifact
1

Workaround

Add to ~/.claude/settings.json — T3 Code passes --setting-sources=user,project,local, so this is
read. Takes effect on the next session:

{ "env": { "CLAUDE_CODE_ARTIFACT": "1" } }

Where a fix would go, if you want one

apps/server/src/provider/Drivers/ClaudeHome.ts → makeClaudeEnvironment is the single place the
spawned CLI's environment is built, and buildClaudeCapabilitiesProbeQueryOptions already takes its
env from there, so the capability probe would pick it up too. Two things worth knowing before
touching it: the early return when homePath is empty needs the same treatment, and
ClaudeHome.test.ts asserts object identity against process.env, so that assertion has to
change. It comes to about ten lines.

I have that patch written and I am happy to open it as a small PR — but CONTRIBUTING.md asks for a
discussion before non-trivial changes and says you are not actively taking contributions, so I have
filed the report and left the PR alone. Say the word if you want it.

Filed as a bug rather than in Ideas because the capability disappears with no diagnostic and no
setting, rather than being a new capability anyone is asking for — but move it if you read it the
other way.

Activity

  1. t3dotgg commented on Aug 27, 2026

    @t3dotgg
    Member

    Thanks for the detailed report. We believe this is resolved by setting CLAUDE_CODE_ARTIFACT=1 in Settings > Providers > Claude > Environment variables, then starting a new session.

    The report's claim that no T3 setting can enable Artifact is contradicted by the existing Claude provider Environment variables editor. Adding CLAUDE_CODE_ARTIFACT=1 reaches the real SDK session and its probe without being filtered, including with a custom Claude home. The reporter supplies the upstream opt-in condition and a working configuration route. T3 still does not enable Artifact by default or provide an Artifact-specific disabled-tool diagnostic.

    I'm closing this as a configuration or support resolution as part of an automated pass on all open issues. This does not claim that T3 Code shipped a code fix. If new evidence shows that current T3 Code causes the problem, please reply with the version and reproduction details, and we can reopen it.

  2. Daeroni commented on Sep 3, 2026

    @Daeroni

    Requesting a reopen with current repro details, as the closing comment asked.

    Still reproducible on T3 Code 0.0.38 with the bundled @anthropic-ai/claude-agent-sdk 0.3.170 and Claude Code 2.1.259, so the cause is unchanged: T3 spawns the CLI with CLAUDE_CODE_ENTRYPOINT=sdk-ts, and Claude Code registers the Artifact tool in SDK sessions only when CLAUDE_CODE_ARTIFACT is truthy. Checked against the 2.1.259 binary:

    if(!truthy(env.CLAUDE_CODE_ARTIFACT) && isArtifactSdkDefaultOff()) return false;
    // isArtifactSdkDefaultOff: entrypoint is sdk-ts, sdk-py, sdk-cli, claude-code-github-action or mcp

    Session init tool list, same account and binary:

    $ CLAUDE_CODE_ENTRYPOINT=sdk-ts claude -p --output-format stream-json --verbose --max-turns 1 "ok" | head -1 | jq -c '[.tools[]|select(test("Artifact"))]'
    []
    $ CLAUDE_CODE_ARTIFACT=1 CLAUDE_CODE_ENTRYPOINT=sdk-ts claude -p --output-format stream-json --verbose --max-turns 1 "ok" | head -1 | jq -c '[.tools[]|select(test("Artifact"))]'
    ["Artifact"]

    The per-user env var works, but every T3 user has to discover this thread first, because the tool is absent rather than denied and nothing in the UI says why. It is the same shape as #9029: the SDK ships with a feature off that the interactive CLI has on, and T3 is the embedding application that is expected to opt in.

    Suggested fix, following the revised approach agreed in #9031: makeClaudeEnvironment in apps/server/src/provider/Drivers/ClaudeHome.ts sets CLAUDE_CODE_ARTIFACT=1 only when the variable is unset in the source environment, on both return paths (the empty homePath early return currently hands back process.env untouched). An explicit CLAUDE_CODE_ARTIFACT=0, CLAUDE_CODE_DISABLE_ARTIFACT=1, or "enableArtifact": false in Claude settings keeps working, so users and admins who want artifacts off are not overridden. buildClaudeCapabilitiesProbeQueryOptions takes its env from the same function, so the capability probe follows.

    Environment: Linux, T3 Code 0.0.38 (server via systemd user unit), Claude Code 2.1.259, Claude provider, Fable 5.1.

  3. jecrapo commented on Oct 2, 2026

    @jecrapo

    Filed #14816 to track the v2 default, since provider changes are on hold until v2 lands.

  4. 22 remaining items

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions