Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/server/src/codexAppServerManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ describe("classifyCodexStderrLine", () => {
expect(classifyCodexStderrLine(line)).toBeNull();
});

it("ignores known unauthenticated supabase mcp transport shutdown noise", () => {
const line =
'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\\"" })';
expect(classifyCodexStderrLine(line)).toBeNull();
});

it("keeps unknown structured errors", () => {
const line = "2026-02-08T04:24:20.085687Z ERROR codex_core::runtime: unrecoverable failure";
expect(classifyCodexStderrLine(line)).toEqual({
Expand Down
8 changes: 8 additions & 0 deletions apps/server/src/codexAppServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ const BENIGN_ERROR_LOG_SNIPPETS = [
"state db missing rollout path for thread",
"state db record_discrepancy: find_thread_path_by_id_str_in_subdir, falling_back",
];
const BENIGN_STDERR_MESSAGE_SNIPPETS = [
'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\\""',
];
const RECOVERABLE_THREAD_RESUME_ERROR_SNIPPETS = [
"not found",
"missing thread",
Expand Down Expand Up @@ -518,6 +521,11 @@ export function classifyCodexStderrLine(rawLine: string): { message: string } |
return null;
}

const isBenignMessage = BENIGN_STDERR_MESSAGE_SNIPPETS.some((snippet) => line.includes(snippet));
if (isBenignMessage) {
return null;
}

const match = line.match(CODEX_STDERR_LOG_REGEX);
if (match) {
const level = match[1];
Expand Down
Loading