You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 055a2dc
Browse filesBrowse the repository at this point in the historyBrowse files
-`--session <key>` binds the grant to a Gateway session. Defaults to the main session.
31
+
-`--url <url>` selects a Gateway for a bare reference or `--session` key. Do
32
+
not combine it with a URL target.
33
+
-`--token <token>` and `--password <password>` provide explicit Gateway auth.
34
+
-`--tls-fingerprint <sha256>` pins the Gateway TLS certificate.
20
35
-`--ttl <ms>` requests a positive grant TTL in milliseconds. The Gateway applies its own ceiling.
21
36
-`--bin <path>` selects the Claude Code binary. Default: `claude`.
22
37
-`--print-config` writes the temporary `.mcp.json`, prints the launch command and env, and leaves the grant live until TTL expiry (it does not spawn Claude Code or revoke the grant).
23
38
39
+
Pass either a positional target or `--session`, not both. Short references are
40
+
resolved before the scoped attach grant is minted; a missing session is never
41
+
created implicitly.
42
+
43
+
A URL or host target never reuses configured credentials or
44
+
`OPENCLAW_GATEWAY_TOKEN` / `OPENCLAW_GATEWAY_PASSWORD`. It uses the stored
45
+
device token for that exact Gateway origin, or explicit `--token`/`--password`
46
+
credentials. On first contact, pass one of those credentials once, approve the
47
+
pairing request in that Gateway's Control UI, and retry; see
48
+
[Devices](/cli/devices). Session URLs must stay credential-free: userinfo and
49
+
sensitive query or fragment parameters such as `token` and `password` are
50
+
rejected.
51
+
52
+
Target resolution uses the same [session target error matrix](/cli/tui#session-target-errors)
53
+
as `openclaw tui`.
54
+
24
55
The bearer token is passed through environment variables, not argv. OpenClaw launches Claude Code with `--strict-mcp-config --mcp-config <path>` so ambient Claude MCP servers do not join the attached session. Normal launches (without `--print-config`) revoke the grant when the Claude Code process exits.
25
56
26
-
See also: [Gateway CLI](/cli/gateway), [MCP CLI](/cli/mcp), and [ACP CLI](/cli/acp).
57
+
See also: [Control UI URLs](/web/urls), [Devices](/cli/devices), [Gateway CLI](/cli/gateway), [MCP CLI](/cli/mcp), and [ACP CLI](/cli/acp).
| The Gateway predates short-link resolution | Copy the full session key from that Gateway's Control UI. |
91
+
| Session missing or short ref ambiguous | For the configured/local Gateway, run `openclaw sessions list`; for a URL/host target, choose a longer or full key in that Gateway's Control UI. |
92
+
| Gateway unreachable | The error names the selected origin. For a `*.ts.net` host, connect Tailscale and confirm the Gateway is reachable on the tailnet. |
93
+
| Stored device token revoked or rotated | Rotate it with `openclaw devices rotate --device <deviceId> --role operator`, then reconnect. |
94
+
| TLS certificate pin mismatch | The original TLS fingerprint error passes through unchanged; verify the configured or explicit pin before retrying. |
0 commit comments