[BUG] enableArtifact: false also disables the scratchpad directory

Status Open
Reported on v2.1.186
Maintainer reply None cached
Activity 0 comments · opened Sep 12, 2026

Preflight Checklist

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

What's Wrong?

"enableArtifact": false in settings.json also removes the Scratchpad directory: line from the system prompt. Artifact publishing and the agent's session temp directory are unrelated features.

isScratchpadEnabled()    = P("tengu_scratch", false) || isArtifactToolEligible()
isArtifactToolEligible() = !br() && vl()
br()                     = !tWe().enabled
tWe()                    = {enableKey:"enableArtifact", legacyDisableKey:"disableArtifact",
                            envDisableVar:"CLAUDE_CODE_DISABLE_ARTIFACT", defaultOn:true}

The || isArtifactToolEligible() arm entered in 2.1.186. In 2.1.185 and earlier the expression was P("tengu_scratch", false) alone, so the artifact setting could not affect the scratchpad. disableArtifact already existed then, so this is a change in behavior, not a new setting.

With tengu_scratch off (its default), enableArtifact: false alone now disables the scratchpad. There is no local opt-in for tengu_scratch: getEnvironmentOverrides() returns null, readConfigOverrides() returns undefined, and cachedGrowthBookFeatures is skipped whenever remoteEvalFeatureValues.size > 0. Turning artifacts off is therefore a one-way door.

Builds checked: coupling absent in 121, 161, 174, 179, 183, 185; present in 186, 187, 202, 224, 236, 238, 240, 241, 242, 258, 259, 267, 268, 269.

What Should Happen?

The scratchpad is gated on its own setting, not on enableArtifact.

Steps to Reproduce

  1. Open an interactive session; the # Environment block names a Scratchpad directory:.
  2. Set "enableArtifact": false in ~/.claude/settings.json.
  3. The session receives # Environment update: The scratchpad directory announced earlier is no longer available.
  4. Set it back to true; the line returns.

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.185

Claude Code Version

2.1.269 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

View original on GitHub ↗