Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

restore streaming notifications from codex app server

Theo Browne2c9121553eab
diff --git a/apps/server/src/codexAppServerManager.test.ts b/apps/server/src/codexAppServerManager.test.ts
index 65a0687fb..afb23d48a 100644
--- a/apps/server/src/codexAppServerManager.test.ts
+++ b/apps/server/src/codexAppServerManager.test.ts
@@ -350,94 +350,3 @@ describe("thread checkpoint control", () => {
});
});
});
-
-describe("notification forwarding", () => {
- it("suppresses streamed assistant message notifications", () => {
- const manager = new CodexAppServerManager();
- const emittedMethods: string[] = [];
- manager.on("event", (event) => {
- emittedMethods.push(event.method);
- });
-
- const context = {
- session: {
- sessionId: "sess_1",
- provider: "codex",
- status: "running",
- threadId: "thread_1",
- createdAt: "2026-02-10T00:00:00.000Z",
- updatedAt: "2026-02-10T00:00:00.000Z",
- },
- };
-
- const handleServerNotification = (
- manager as unknown as {
- handleServerNotification: (
- context: unknown,
- notification: { method: string; params?: unknown },
- ) => void;
- }
- ).handleServerNotification.bind(manager);
-
- handleServerNotification(context, {
- method: "item/agentMessage/delta",
- params: {
- itemId: "item_msg_1",
- delta: "Partial text",
- },
- });
- handleServerNotification(context, {
- method: "item/started",
- params: {
- item: {
- id: "item_msg_1",
- type: "agentMessage",
- text: "Working...",
- },
- },
- });
-
- expect(emittedMethods).toEqual([]);
- });
-
- it("keeps completed assistant message notifications", () => {
- const manager = new CodexAppServerManager();
- const emittedMethods: string[] = [];
- manager.on("event", (event) => {
- emittedMethods.push(event.method);
- });
-
- const context = {
- session: {
- sessionId: "sess_1",
- provider: "codex",
- status: "running",
- threadId: "thread_1",
- createdAt: "2026-02-10T00:00:00.000Z",
- updatedAt: "2026-02-10T00:00:00.000Z",
- },
- };
-
- const handleServerNotification = (
- manager as unknown as {
- handleServerNotification: (
- context: unknown,
- notification: { method: string; params?: unknown },
- ) => void;
- }
- ).handleServerNotification.bind(manager);
-
- handleServerNotification(context, {
- method: "item/completed",
- params: {
- item: {
- id: "item_msg_1",
- type: "agentMessage",
- text: "Final response",
- },
- },
- });
-
- expect(emittedMethods).toEqual(["item/completed"]);
- });
-});
diff --git a/apps/server/src/codexAppServerManager.ts b/apps/server/src/codexAppServerManager.ts
index b6cd09956..912f9b2db 100644
--- a/apps/server/src/codexAppServerManager.ts
+++ b/apps/server/src/codexAppServerManager.ts
@@ -584,10 +584,6 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
context: CodexSessionContext,
notification: JsonRpcNotification,
): void {
- if (this.shouldSuppressNotification(notification)) {
- return;
- }
-
const route = this.readRouteFields(notification.params);
const textDelta =
notification.method === "item/agentMessage/delta"
@@ -648,19 +644,6 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
}
}
- private shouldSuppressNotification(notification: JsonRpcNotification): boolean {
- if (notification.method === "item/agentMessage/delta") {
- return true;
- }
-
- if (notification.method !== "item/started") {
- return false;
- }
-
- const itemType = this.readString(this.readObject(notification.params, "item"), "type");
- return itemType === "agentMessage";
- }
-
private handleServerRequest(context: CodexSessionContext, request: JsonRpcRequest): void {
const route = this.readRouteFields(request.params);
const requestKind = this.requestKindForMethod(request.method);