惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
MyScale Blog
MyScale Blog
量子位
月光博客
月光博客
J
Java Code Geeks
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
G
Google Developers Blog
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
IT之家
IT之家
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
B
Blog
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
B
Blog RSS Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(auth): clarify Codex OAuth region failures (#71501) ·...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai

1919

- Google Chat: preserve reply text when a typing indicator message is deleted or can no longer be updated, so media captions and first text chunks are resent instead of silently disappearing. (#71498) Thanks @colin-lgtm.

2020

- Heartbeat: clamp oversized scheduler delays through the shared safe timer helper, preventing `every` values over Node's timeout cap from becoming a 1 ms crash loop. Fixes #71414. (#71478) Thanks @hclsys.

2121

- Control UI/chat: collapse assistant token/model context details behind an explicit Context disclosure and show full dates in message footers, making historical transcript timing clear without noisy default metadata. (#71337) Thanks @BunsDev.

22+

- OpenAI/Codex OAuth: explain `unsupported_country_region_territory` token-exchange failures with a proxy/region hint instead of surfacing a generic OAuth error. Fixes #51175.

2223

- Telegram: remove the startup persisted-offset `getUpdates` preflight so polling restarts do not self-conflict before the runner starts. Fixes #69304. (#69779) Thanks @chinar-amrutkar.

2324

- Telegram: keep the polling stall watchdog active even when grammY reports the runner as not running while its task is still pending, so a rebuilt transport cannot leave `getUpdates` silent until a manual gateway restart. Fixes #69064. Thanks @LDLoeb.

2425

- Browser/Playwright: ignore benign already-handled route races during guarded navigation so browser-page tasks no longer fail when Playwright tears down a route mid-flight. (#68708) Thanks @Steady-ai.

Original file line numberDiff line numberDiff line change

@@ -181,6 +181,28 @@ describe("loginOpenAICodexOAuth", () => {

181181

);

182182

});

183183
184+

it("explains OpenAI unsupported region token exchange failures", async () => {

185+

mocks.loginOpenAICodex.mockRejectedValue(new Error("403 unsupported_country_region_territory"));

186+
187+

const { prompter, spin } = createPrompter();

188+

const runtime = createRuntime();

189+

await expect(

190+

loginOpenAICodexOAuth({

191+

prompter,

192+

runtime,

193+

isRemote: false,

194+

openUrl: async () => {},

195+

}),

196+

).rejects.toThrow(/unsupported_region/i);

197+
198+

expect(spin.stop).toHaveBeenCalledWith("OpenAI OAuth failed");

199+

expect(runtime.error).toHaveBeenCalledWith(expect.stringContaining("HTTPS_PROXY"));

200+

expect(prompter.note).toHaveBeenCalledWith(

201+

"Trouble with OAuth? See https://docs.openclaw.ai/start/faq",

202+

"OAuth help",

203+

);

204+

});

205+
184206

it("passes manual code input hook for remote oauth flows", async () => {

185207

const creds = createCodexCredentials();

186208

mocks.loginOpenAICodex.mockImplementation(async (opts: CodexLoginOptions) => {

Original file line numberDiff line numberDiff line change

@@ -15,7 +15,10 @@ const openAICodexOAuthOriginator = "openclaw";

1515

const localManualFallbackDelayMs = 15_000;

1616

const localManualFallbackGraceMs = 1_000;

1717
18-

type OpenAICodexOAuthFailureCode = "callback_timeout" | "callback_validation_failed";

18+

type OpenAICodexOAuthFailureCode =

19+

| "callback_timeout"

20+

| "callback_validation_failed"

21+

| "unsupported_region";

1922
2023

function waitForDelayOrLoginSettle(params: {

2124

delayMs: number;

@@ -54,6 +57,16 @@ function createOpenAICodexOAuthError(

5457
5558

function rewriteOpenAICodexOAuthError(error: unknown): Error {

5659

const message = formatErrorMessage(error);

60+

if (/unsupported_country_region_territory/i.test(message)) {

61+

return createOpenAICodexOAuthError(

62+

"unsupported_region",

63+

[

64+

"OpenAI rejected the token exchange for this country, region, or network route.",

65+

"If you normally use a proxy, verify HTTPS_PROXY, HTTP_PROXY, or ALL_PROXY is set for the OpenClaw process and then retry `openclaw models auth login --provider openai-codex`.",

66+

].join(" "),

67+

error,

68+

);

69+

}

5770

if (/state mismatch|missing authorization code/i.test(message)) {

5871

return createOpenAICodexOAuthError("callback_validation_failed", message, error);

5972

}