[DOCS] `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE` environment variable not documented

Resolved 💬 2 comments Opened Apr 2, 2026 by coygeek Closed Apr 5, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/env-vars

Section/Topic

The environment variables reference page lists all CLAUDE_CODE_PLUGIN_* variables (e.g., CLAUDE_CODE_PLUGIN_CACHE_DIR, CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS, CLAUDE_CODE_PLUGIN_SEED_DIR) but is missing CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE. The plugin marketplaces page (https://code.claude.com/docs/en/plugin-marketplaces) would also benefit from a mention in its offline/container deployment section.

Current Documentation

No documentation currently exists for this environment variable. The env-vars reference page contains no entry for CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE, and the plugin-marketplaces page contains no mention of it despite discussing related offline and seed-directory scenarios.

What's Wrong or Missing?

Changelog v2.1.90 added CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE, but this environment variable does not appear anywhere in the documentation.

Users working in offline or air-gapped environments — a scenario already acknowledged in the plugin-marketplaces page via CLAUDE_CODE_PLUGIN_SEED_DIR — have no way to discover this variable or understand when to use it. Specifically, users need to know:

  • Purpose: when set, instructs Claude Code to keep the existing marketplace cache intact if git pull fails during a marketplace update, rather than clearing or invalidating the cache.
  • When to use it: primarily useful in offline or network-restricted environments where git pull is expected to fail but a previously populated cache should remain usable.
  • Relationship to CLAUDE_CODE_PLUGIN_SEED_DIR: seed directories auto-disable updates (as documented), but user-added marketplaces still attempt git pull on startup; this variable handles the failure case for those marketplaces gracefully.

Suggested Improvement

On https://code.claude.com/docs/en/env-vars, add a row in the table (alphabetically among the CLAUDE_CODE_PLUGIN_* entries, between CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS and CLAUDE_CODE_PLUGIN_SEED_DIR):

| Variable | Description |
|----------|-------------|
| CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE | Set to 1 to preserve the existing marketplace cache when git pull fails during a marketplace update. Without this variable, a failed git pull may clear or invalidate the cached marketplace data. Useful in offline or network-restricted environments where git pull is expected to fail but a previously populated cache should remain usable. |

On https://code.claude.com/docs/en/plugin-marketplaces, in the offline/container deployment section (near the CLAUDE_CODE_PLUGIN_SEED_DIR discussion), add a note explaining that user-added marketplaces (not covered by a seed directory) still attempt git pull on startup, and that CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1 can be set to preserve their cache when that pull fails.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/env-vars | Primary reference for all environment variables; CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE is absent |
| https://code.claude.com/docs/en/plugin-marketplaces | Covers offline/container plugin deployment; does not mention this variable despite its relevance to offline environments |

Total scope: 2 pages affected

Source: Changelog v2.1.90

"Added CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE env var to keep the existing marketplace cache when git pull fails, useful in offline environments"

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗