Skip to content
2 changes: 1 addition & 1 deletion packages/host-daemon-contract/src/protocol.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const HOST_DAEMON_PROTOCOL_VERSION = 212 as const;
export const HOST_DAEMON_PROTOCOL_VERSION = 213 as const;

export const HOST_ARTIFACT_MAX_BYTES = 256 * 1024 * 1024;
2 changes: 1 addition & 1 deletion packages/host-daemon-contract/test/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ const CONTRIBUTED_ENV = [

describe("host-daemon command schemas", () => {
it("uses the current host-daemon protocol version", () => {
expect(HOST_DAEMON_PROTOCOL_VERSION).toBe(212);
expect(HOST_DAEMON_PROTOCOL_VERSION).toBe(213);
expect(HOST_ARTIFACT_MAX_BYTES).toBe(256 * 1024 * 1024);
});

Expand Down
13 changes: 12 additions & 1 deletion plugins/provider-codex/src/bridge/app-server-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ export class CodexAppServerExitedError extends Error {
}
}

export class CodexAppServerRpcError extends Error {
constructor(
message: string,
readonly code: number | undefined,
) {
super(message);
this.name = "CodexAppServerRpcError";
}
}

interface PendingChildRequest {
resolve(value: unknown): void;
reject(error: Error): void;
Expand Down Expand Up @@ -256,9 +266,10 @@ export function createCodexAppServerConnection(
}
if (message.error) {
request.reject(
new Error(
new CodexAppServerRpcError(
message.error.message ??
`codex app-server returned error code ${message.error.code ?? "unknown"}`,
message.error.code,
),
);
} else {
Expand Down
Loading
Loading