Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex children no longer fail to start under a managed sandbox policy #31001

Closedjondeibel(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/31001/headopened View on GitHub

Showing 7 changed files with 88 additions and 51 deletions (loading 4).

x
0 of 7 viewed, 7 left
20 additions and 0 deletionsapps/server/src/orchestration-v2/RuntimePolicy.test.tsModified
View file
@@ -65,9 +65,11 @@
​
const grokInstanceId = ProviderInstanceId.make("grok");
const antigravityInstanceId = ProviderInstanceId.make("antigravity");
+const managedCodexInstanceId = ProviderInstanceId.make("codex-managed");
const supportedRuntimeModesByInstance = new Map<ProviderInstanceId, ReadonlyArray<RuntimeMode>>([
[grokInstanceId, ["approval-required", "auto", "full-access"]],
[antigravityInstanceId, ["approval-required", "auto-accept-edits", "full-access"]],
+ [managedCodexInstanceId, ["auto-accept-edits", "auto"]],
]);
const providerInstanceFor = (instanceId: ProviderInstanceId) =>
({
@@ -157,6 +159,24 @@
assert.equal(yield* modeFor(providerInstanceId, "auto-accept-edits"), "auto-accept-edits");
}),
+​
+ it.effect("steps down to the broadest mode Codex allows when it forbids Supervised", () =>
+ Effect.gen(function* () {
+ const policy = yield* RuntimePolicy.RuntimePolicyV2;
+ const now = yield* DateTime.now;
+ const modeFor = (runtimeMode: RuntimeMode) =>
+ policy
+ .resolve({
+ thread: makeThread({ now, worktreePath: null, runtimeMode }),
+ modelSelection: { instanceId: managedCodexInstanceId, model: "gpt-5.5" },
+ })
+ .pipe(Effect.map((resolved) => resolved.runtimeMode));
+​