1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

clawdbot + OpenAI Codex (gpt-5.2) の認証が切れたときの復旧手順【2026年版】

1
Posted at

1. はじめに

clawdbotとは

  • CLIベースのAIエージェントゲートウェイ
  • 複数のLLMプロバイダー(OpenAI, Anthropic, Bedrockなど)を統合管理
  • Discord, Slack, WhatsAppなど複数チャネルに対応

今回の環境

clawdbot: 2026.1.24-3
OS: macOS (Darwin 24.6.0)
Node.js: volta経由
設定モデル: openai-codex/gpt-5.2

発生した問題

clawdbotを使おうとしたら、OpenAI Codexの認証が切れていてモデルが使えなくなっていた。


2. 認証状態の確認

2.1 詳細な認証状態を確認

clawdbot models status

出力例:

OAuth/token status
- openai-codex usage: 5h 100% left ⏱4h 59m · Day 53% left ⏱2d 15h
  - openai-codex:codex-cli expired expires in 0m (codex-cli)  ← ★期限切れ
  - openai-codex:default ok expires in 10d

ステータスの見方:

ステータス 意味
ok 正常(有効期限内)
expiring まもなく期限切れ
expired 期限切れ(要再認証)
missing 認証情報なし

2.2 モデル一覧でも確認可能

clawdbot models list

出力例:

Model                         Input  Ctx  Local Auth  Tags
openai-codex/gpt-5.2          -      -    -     -     default,configured,missing

missingタグ = 認証が切れている


3. 復旧手順

3.1 OpenAI Codex CLIのインストール(未インストールの場合)

npm install -g @openai/codex

3.2 Codex CLIで認証実行

codex auth login

出力例:

Starting local login server on http://localhost:1455.
If your browser did not open, navigate to this URL to authenticate:

https://auth.openai.com/oauth/authorize?response_type=code&client_id=...

Successfully logged in

→ ブラウザが自動で開く → OpenAIアカウントでログイン → 成功

3.3 clawdbotへの自動同期を確認

clawdbot models status

出力例:

[agents/auth-profiles] synced openai-codex credentials from codex cli  ← ★自動同期された

OAuth/token status
- openai-codex:codex-cli expiring expires in 59m (codex-cli)  ← ★復活!
- openai-codex:default ok expires in 10d

ポイント: clawdbotはCodex CLIの認証情報を自動検出・同期してくれる


4. Gateway起動確認

clawdbot gateway

出力例:

[gateway] agent model: openai-codex/gpt-5.2
[gateway] listening on ws://127.0.0.1:18789 (PID 92941)
[discord] logged in to discord as 1465522814315401482

→ 正常起動を確認


5. 認証の有効期限について

プロファイル 有効期限 備考
openai-codex:codex-cli 約1時間 短期トークン
openai-codex:default 約10日 長期トークン

Tips:

  • codex-cliが切れてもdefaultが生きていれば動作する
  • 両方切れた場合はcodex auth loginで再認証

6. コマンド早見表

やりたいこと コマンド
認証状態確認 clawdbot models status
モデル一覧確認 clawdbot models list
OpenAI Codex再認証 codex auth login
Gateway起動 clawdbot gateway

7. まとめ

  1. Codex CLI経由で認証 → clawdbotが自動同期
  2. 認証は定期的に切れるのでclawdbot models statusで確認する習慣を

参考リンク

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?