Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.328 ·

Hidden --metadata flag labels cloud sessions on self-hosted environments

A new hidden, repeatable --metadata key=value flag labels a cloud session for a self-hosted environment's start script and needs --environment

Group of 4 Use it now Notable New Features
JSON All of v2.1.328
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
CLIArea: what it touches
New FeaturesKind: in v2.1.328,
What probably matters to youSection of the release

Unclear What --metadata does, and whether it is meant for people to use directly, is not known.

What

A new command-line flag, --metadata <key=value>, attaches labels to a cloud session that runs on a self-hosted environment (machines you run yourself). The labels are for the script that starts the session's machine.

  • It is hidden from help and can be given more than once.
  • Like --correlation-id, it requires --environment with a self-hosted environment's ID.
  • A key is lower-case letters and digits with single _ between them, and starts with a letter, as in --metadata size=large. Other shapes give an error, and duplicate keys are rejected.
  • The values are stored together with correlation_id.
  • --metadata and --correlation-id are added to the list of flags that already held --resume-drops-turn, --project-config-root, --exec, --forward-home-settings and --attach-serve.

Why

Operators of self-hosted environments can pass per-session settings, such as a machine size, to their own scripts without changing the scripts for every session.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat `--metadata` does, and whether it is meant for people to use directly, is not known.
Anthropic's release notes agreeSelf-hosted runner: Added --metadata key=value to claude --environment, to label a session for the spawn-runner hook

See this entry in the whole of v2.1.328 →

Feedback