{
  "slug": "temporal-cli-extensions-support-oauth-client-options-44f0302a1bc8",
  "title": "Temporal CLI extensions support OAuth client options",
  "tools": [
    "temporal"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-05T15:35:29.000Z",
  "announced_at": "2026-02-05T15:35:29.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When building a CLI extension client, use `ClientOptionsBuilder` with generated `CommonOptions` and `ClientOptions` to build SDK dial options. Store OAuth with `StoreClientOAuth`; set `Address` to persist the profile address, using `${namespace}` when the address should include the runtime namespace.",
    "examples": [
      "builder := &cliext.ClientOptionsBuilder{CommonOptions: common, ClientOptions: client}\nopts, err := builder.Build(ctx)",
      "err := cliext.StoreClientOAuth(cliext.StoreClientOAuthOptions{OAuth: oauth, Address: \"<address>/${namespace}\"})",
      "result, err := cliext.LoadClientOAuth(cliext.LoadClientOAuthOptions{})"
    ],
    "gotchas": [
      "Version: v1.6.0",
      "ClientOptionsBuilder.CommonOptions (required): Generated common CLI options, including profile configuration.",
      "ClientOptionsBuilder.ClientOptions (required): Generated client configuration from flags.",
      "ClientOptionsBuilder.Build(ctx) (required): Builds SDK `client.Options`; returns options and an error. If `ClientConnectTimeout` is set, apply it as a context timeout when dialing.",
      "LoadClientOAuthOptions.ConfigFilePath: Overrides the config path; empty uses `TEMPORAL_CONFIG_FILE` or the default path.",
      "LoadClientOAuthOptions.ProfileName: Selects the profile; empty uses `TEMPORAL_PROFILE` or `default`.",
      "LoadClientOAuthOptions.EnvLookup: Overrides environment lookup; nil uses OS environment lookup.",
      "StoreClientOAuthOptions.ConfigFilePath: Overrides the config path; empty uses `TEMPORAL_CONFIG_FILE` or the default path.",
      "StoreClientOAuthOptions.ProfileName: Selects the profile; empty uses `TEMPORAL_PROFILE` or `default`.",
      "StoreClientOAuthOptions.OAuth: OAuth configuration to store; nil removes OAuth from the profile.",
      "StoreClientOAuthOptions.Address: Server address to store in the profile; empty leaves address unchanged. `${namespace}` in the address is replaced with the profile namespace when building client options.",
      "StoreClientOAuthOptions.EnvLookup: Overrides environment lookup; nil uses OS environment lookup.",
      "OAuthConfig.ClientConfig: OAuth 2.0 client configuration.",
      "OAuthConfig.Token: OAuth 2.0 token.",
      "Prerequisite: Use the `github.com/temporalio/cli/cliext` package; its Go API is the extension helper library.",
      "Prerequisite: When `CommonOptions.ClientConnectTimeout` is set, apply it as a context timeout when dialing.",
      "The source says use of OAuth with the `default` namespace produces a helpful error message."
    ]
  },
  "why_it_matters": "Configure OAuth for a CLI extension client and set its address for the active namespace.",
  "sources": [
    "https://github.com/temporalio/cli/releases/tag/v1.6.0",
    "https://github.com/temporalio/cli/pull/892",
    "https://github.com/temporalio/cli/pull/913",
    "https://raw.githubusercontent.com/temporalio/cli/v1.6.0/cliext/client.go",
    "https://raw.githubusercontent.com/temporalio/cli/v1.6.0/cliext/config.oauth.go",
    "https://github.com/temporalio/proposals/blob/master/cli/cli-extensions.md"
  ],
  "rank": 0.91028,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-75910f05bdf05cbd-7:gate",
    "evidence_hash": "4bdf829b426420af68752ae52164f332687e915629357b8c169ceb8197a030d7"
  },
  "review": {
    "draft_hash": "10c6fdb29d323b99e97da2b4cee6c317e589a580c43ed41c83b0626b631276d4",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.91 >= 0.9; 2 needed) and Jev gave 0.61 (>= 0.6 needed)."
  }
}
