Skip to content

Commit 6cf2a72

Browse files
authored
Ignore benign Supabase auth shutdown stderr (#353)
- Skip known rmcp transport shutdown noise from unauthenticated Supabase MCP - Keep the stderr classifier from surfacing this expected error
1 parent adb5441 commit 6cf2a72

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

apps/server/src/codexAppServerManager.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ describe("classifyCodexStderrLine", () => {
193193
expect(classifyCodexStderrLine(line)).toBeNull();
194194
});
195195

196+
it("ignores known unauthenticated supabase mcp transport shutdown noise", () => {
197+
const line =
198+
'2026-04-07T11:04:55.822542Z ERROR rmcp::transport::worker: worker quit with fatal: Transport channel closed, when AuthRequired(AuthRequiredError { www_authenticate_header: "Bearer error=\\"invalid_request\\", error_description=\\"No access token was provided in this request\\", resource_metadata=\\"https://mcp.supabase.com/.well-known/oauth-protected-resource/mcp\\"" })';
199+
expect(classifyCodexStderrLine(line)).toBeNull();
200+
});
201+
196202
it("keeps unknown structured errors", () => {
197203
const line = "2026-02-08T04:24:20.085687Z ERROR codex_core::runtime: unrecoverable failure";
198204
expect(classifyCodexStderrLine(line)).toEqual({

apps/server/src/codexAppServerManager.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ const BENIGN_ERROR_LOG_SNIPPETS = [
161161
"state db missing rollout path for thread",
162162
"state db record_discrepancy: find_thread_path_by_id_str_in_subdir, falling_back",
163163
];
164+
const BENIGN_STDERR_MESSAGE_SNIPPETS = [
165+
'worker quit with fatal: Transport channel closed, when AuthRequired(AuthRequiredError { www_authenticate_header: "Bearer error=\\"invalid_request\\", error_description=\\"No access token was provided in this request\\", resource_metadata=\\"https://mcp.supabase.com/.well-known/oauth-protected-resource/mcp\\""',
166+
];
164167
const RECOVERABLE_THREAD_RESUME_ERROR_SNIPPETS = [
165168
"not found",
166169
"missing thread",
@@ -518,6 +521,11 @@ export function classifyCodexStderrLine(rawLine: string): { message: string } |
518521
return null;
519522
}
520523

524+
const isBenignMessage = BENIGN_STDERR_MESSAGE_SNIPPETS.some((snippet) => line.includes(snippet));
525+
if (isBenignMessage) {
526+
return null;
527+
}
528+
521529
const match = line.match(CODEX_STDERR_LOG_REGEX);
522530
if (match) {
523531
const level = match[1];

0 commit comments

Comments
 (0)