[BUG] Cloud Routines: declared plugins never load — SKIP_PLUGIN_MARKETPLACE=true force-set, startup marketplace resolution skipped

Open 💬 0 comments Opened Jun 13, 2026 by alex-radaev

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?

In a cloud Routine (claude.ai/code/routines), a plugin declared in the cloned repo's .claude/settings.json (extraKnownMarketplaces + enabledPlugins) never loads. At session start claude plugin list is empty and ~/.claude/plugins/known_marketplaces.json does not exist — i.e. no marketplace fetch is ever attempted.

Root cause: the routine container sets SKIP_PLUGIN_MARKETPLACE=true (env type cloud_default), which short-circuits startup marketplace resolution before any network/credential check. Setting SKIP_PLUGIN_MARKETPLACE=false as an environment variable does not stickcloud_default resets it at runtime. Only a per-command prefix (SKIP_PLUGIN_MARKETPLACE=false claude plugin …) overrides it.

Consequence: the plugin's hooks, subagents, and commands are all inert. A mid-session claude plugin install is a false greenplugin list reports enabled, but components only attach at session start (there is no /reload-plugins in cloud), so hooks never fire and <plugin>: subagent types are "not found". (#63028 describes a first-session attach race that compounds this.)

What Should Happen?

A plugin declared via .claude/settings.json in a routine's repo should install and attach at session start — same as a local session — with hooks/subagents/commands active. At minimum, SKIP_PLUGIN_MARKETPLACE should be overridable via the environment config or setup script.

Error Messages/Logs

At startup in a routine session:

$ claude plugin list
No plugins installed.
$ cat ~/.claude/plugins/known_marketplaces.json
cat: /root/.claude/plugins/known_marketplaces.json: No such file or directory
$ echo $SKIP_PLUGIN_MARKETPLACE
true

The SessionStart hook reports the declared plugin as not loaded.

Steps to Reproduce

  1. Create a Routine on a repo whose .claude/settings.json declares a marketplace via extraKnownMarketplaces + enabledPlugins.
  2. Run the routine.
  3. Observe: claude plugin list empty, known_marketplaces.json absent, echo $SKIP_PLUGIN_MARKETPLACEtrue. The plugin and its hooks never load.

Workaround (verified working): add the marketplace repo as a 2nd routine source (clones locally to /home/user/<marketplace> via the injected cred — no token), then install from that local clone in the environment setup script (runs before the session attaches):

SKIP_PLUGIN_MARKETPLACE=false claude plugin marketplace add /home/user/<marketplace>
SKIP_PLUGIN_MARKETPLACE=false claude plugin install <plugin>@<marketplace>

After this, gate hooks fire (a PreToolUse hook blocks a fake-ghp_ Write) and <plugin>: subagents spawn. Caveat: setup scripts are cached (~7d), so the installed plugin freezes at the marketplace HEAD from the last setup-script run.

Is this a regression?

No — research-preview feature.

Claude Code Version

2.1.177 (cloud routine runner)

Platform

Claude Code on the web / Remote Routine

Operating System

Linux (ephemeral cloud container)

Terminal/Shell

Cloud routine session (non-interactive)

Additional Information

Related:

  • #63028 — declared plugins inactive on the first cloud session (attach race) — compounds this.
  • #61231 — CLAUDE_CODE_REMOTE_SKIP_SETTINGS_SYNC=1 breaks MCP OAuth credential restore in remote routines. Same family: CLAUDE_CODE_REMOTE_SKIP_SETTINGS_SYNC is present in the routine env and also breaks git HTTPS — the container sets url."https://x-access-token:@github.com/".insteadOf "https://github.com/" with an empty password, so every authenticated clone fails Invalid username or token. Password authentication is not supported. This is why the documented GITHUB_TOKEN path can't repair plugin install either (the token is injected into the session but not the setup-script phase).

View original on GitHub ↗