fix(server): newer Codex models get T3 Code's instructions again #13547
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 3 commits into
main fromrefs/pull/13547/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/provider/Layers/CodexSessionRuntime.ts line 1995Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1942,3 +1987,9 @@19421987 return;19431988 }194419891990+ if (1991+ notification.method === "item/completed" &&1992+ notification.params.item.type === "contextCompaction" &&1993+ notification.params.threadId === suppressRootId1994+ ) {1995+ yield* restoreAdditionalContext(notification.params.threadId);
- apps/server/src/provider/Layers/CodexSessionRuntime.ts line 2585Resolvedby t3dotgg(GitHub profile, opens in a new tab)@@ -2526,3 +2582,4 @@25262582 options.mcpCapabilities,25272583 ),25282584 });2585+ yield* Ref.set(lastAdditionalContextRef, params.additionalContext);apps/server/src/provider/RuntimeInstructions.ts lines 19 to 20Resolvedby t3dotgg(GitHub profile, opens in a new tab)@@ -2,13 +2,19 @@22 When the t3-code MCP server exposes link_pull_request, you must use it to register every pull request you create or work on for this thread. Call link_pull_request with the full PR URL immediately after creating a PR or starting work on an existing PR. For a stack, call it for every layer, not just the current branch or the top PR. This applies when creating or updating PRs through gh, gh stack, another CLI, or the host API: those operations do not register the PRs with this thread. Linking an already-linked PR is safe. Before finishing PR work, call list_thread_pull_requests and link any PR from your work that is missing. Do not link unrelated PRs mentioned only as background. If a linking call fails, report that failure instead of claiming the PR is linked.33 </pull_request_linking>`;445-/** Shared runtime context; omit model and effort when the harness manages them dynamically. */5+/**6+ * Shared runtime context; omit model and effort when the harness manages them dynamically.7+ * `modelName` is the display name users see in the model picker; `model` is the slug.8+ */69 export function buildRuntimeInstructions(runtime: {710 readonly harness: string;811 readonly model?: string | undefined;12+ readonly modelName?: string | undefined;913 readonly reasoningEffort?: string | undefined;1014 }): string {1115 const harness = toSingleLine(runtime.harness);1216 const model = toSingleLine(runtime.model ?? "");17+ const modelName = toSingleLine(runtime.modelName ?? "");1318 const effort = toSingleLine(runtime.reasoningEffort ?? "");14- const modelInfo = model && model !== "auto" && model !== "default" ? `, as ${model}` : "";19+ const modelLabel =20+ modelName && modelName !== model ? `${modelName} (model slug: ${model})` : model;
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed