Unclear It is not clear whether the server already passes these labels on to the start-up script.
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--environmentwith 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. --metadataand--correlation-idare added to the list of flags that already held--resume-drops-turn,--project-config-root,--exec,--forward-home-settingsand--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.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
It is not clear whether the server already passes these labels on to the start-up script.
Anthropic's release notes agree
Self-hosted runner: Added --metadata key=value to claude --environment, to label a session for the spawn-runner hook