jpskill.com
💬 コミュニケーション コミュニティ 🟢 非エンジニアでもOK 👤 管理職・人事・カスタマー対応

💬 Openai Codex Multi Oauth

openai-codex-multi-oauth

OpenClaw内で複数のOpenAI Codex OAuthプロファイルを管理・デバッグし、プロファイルの切り替えやセッション同期、トークン回復などの問題を解決するためのSkillです。

⏱ Slack絵文字GIF制作 1時間 → 5分
📜 元の英語説明(参考)

Manage and debug multiple OpenAI Codex OAuth profiles inside OpenClaw, including native multi-profile auth stores and external-router setups where one active slot is backed by a repository of multiple OAuth identities. Use when fixing Codex profile switching, session `authProfileOverride` sync, `/status` or usage mismatches, auth.order behavior, active-slot routing, broken-token recovery, or same-email different-account/workspace selection bugs.

🇯🇵 日本人クリエイター向け解説

一言でいうと

OpenClaw内で複数のOpenAI Codex OAuthプロファイルを管理・デバッグし、プロファイルの切り替えやセッション同期、トークン回復などの問題を解決するためのSkillです。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o openai-codex-multi-oauth.zip https://jpskill.com/download/5137.zip && unzip -o openai-codex-multi-oauth.zip && rm openai-codex-multi-oauth.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5137.zip -OutFile "$d\openai-codex-multi-oauth.zip"; Expand-Archive "$d\openai-codex-multi-oauth.zip" -DestinationPath $d -Force; ri "$d\openai-codex-multi-oauth.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して openai-codex-multi-oauth.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → openai-codex-multi-oauth フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
4

💬 こう話しかけるだけ — サンプルプロンプト

  • Openai Codex Multi Oauth で、お客様への返信文を作って
  • Openai Codex Multi Oauth を使って、社内向けアナウンスを書いて
  • Openai Codex Multi Oauth で、メールテンプレートを整備して

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

OpenAI Codex Multi OAuth

Support and debug more than one openai-codex OAuth login inside OpenClaw.

Start here

  1. Run python3 scripts/summarize_codex_profiles.py.
  2. Classify the bug before patching anything.
  3. Change the smallest wrong layer.
  4. Re-test after every change.

If the target setup includes a local helper command or router script, reproduce through that real entrypoint at least once. Synthetic env-injected tests can miss session-sync bugs.

Mental model

Treat these as separate layers:

  • stored preference — any saved local pointer such as codex_profile_id
  • auth orderorder.openai-codex in the auth store
  • session overrideauthProfileOverride for the current chat/session
  • effective runtime profile — the profile that actually handled the request after selection or failover
  • usage source — the token/accountId used by usage-fetch logic
  • display metadata — the label shown to the user, such as email/workspace
  • optional external profile repo — a separate file or store that keeps multiple Codex OAuth identities while runtime uses one active slot

Do not assume these layers always match.

Common architectures

A. Native auth-store setup

OpenClaw stores multiple openai-codex:* profiles directly in auth-profiles.json, and runtime resolves selection from auth order plus session override.

B. External-router setup

A local repo of Codex OAuth identities exists outside normal runtime selection, and a helper/router copies one selected profile into an active slot such as openai-codex:default.

In that design, verify all of these separately:

  • repo profile selected by the router
  • active slot content after routing
  • current session authProfileOverride
  • /status oauth label
  • /status usage source

Decision tree

1) The wrong account is selected

Check in this order:

  1. stored preference or helper-selected profile
  2. order.openai-codex
  3. session authProfileOverride
  4. effective runtime profile
  5. whether failover is expected or a bug

2) /codex_profile-style helper switches profile, but /status does not follow

Check:

  1. whether the helper changed only the active slot or also the current session override
  2. whether the current chat/session was correctly identified
  3. whether the environment that invokes the helper is missing chat/session metadata
  4. whether the platform keeps companion session entries that also need syncing

If the helper is real, re-test through the real command path, not only manual edits.

3) /status oauth changes, but usage does not

Check:

  1. current session authProfileOverride
  2. the effective runtime profile for the current chat
  3. whether the usage loader resolves auth from generic provider order instead of the current session profile
  4. whether the UI is mixing preferred-profile and effective-profile semantics

4) A profile works sometimes but not always

Check:

  1. cooldown / last-good logic
  2. token expiry
  3. soft-pin vs hard-pin semantics
  4. whether failover is expected behavior or a bug

5) A token or profile entry is broken

Check:

  1. whether the same accountId exists in another store or backup
  2. whether only one profile entry can be restored surgically
  3. whether local token parsing fails before request dispatch

6) /status, display labels, and runtime truth disagree

Decide which semantic each surface should represent:

  • preferred profile
  • effective runtime profile
  • usage source profile
  • display metadata label

Then verify every layer against that semantic before patching.

Stable design rules

  • Prefer profile identity by accountId before email when possible.
  • Preserve different workspaces/accounts as separate profiles even when email matches.
  • Keep profile ids stable, for example:
    • openai-codex:default
    • openai-codex:secondary
    • openai-codex:tertiary
    • openai-codex:account-N
  • Do not blur preferred profile, effective runtime profile, and usage source profile.
  • If an external repo exists, treat it as a separate layer instead of silently merging it into runtime state.

Validation checklist

After each change, verify all of these:

  1. stored preference or helper-selected profile is what you expect
  2. auth order is what you expect
  3. current session authProfileOverride is what you expect
  4. runtime actually uses the intended profile
  5. /status shows the intended semantic
  6. usage matches the intended semantic, or the difference is explicitly understood
  7. any helper command resolves the same profile id the runtime is using

Bundled resources

  • Read references/runtime-files.md for the file families that usually matter.
  • Read references/workflows.md for concrete repair workflows and rollback points.
  • Run scripts/summarize_codex_profiles.py before and after changes.

Guardrails

  • Back up auth files or runtime bundles before editing them.
  • Prefer surgical patches over broad rewrites.
  • Keep version-specific assumptions explicit.
  • Do not restart the gateway unless the user asked.
  • Commit workspace skill changes after edits.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。