























@@ -11,6 +11,8 @@ function createAttemptParams(params: {
1111authProfileId?: string;
1212authProfileProvider?: string;
1313authProfileProviders?: Record<string, string>;
14+bootstrapContextMode?: "full" | "lightweight";
15+bootstrapContextRunKind?: "default" | "heartbeat" | "cron";
1416}): EmbeddedRunAttemptParams {
1517const authProfileProviders =
1618params.authProfileProviders ??
@@ -21,6 +23,10 @@ function createAttemptParams(params: {
2123provider: params.provider,
2224modelId: "gpt-5.4",
2325authProfileId: params.authProfileId,
26+ ...(params.bootstrapContextMode ? { bootstrapContextMode: params.bootstrapContextMode } : {}),
27+ ...(params.bootstrapContextRunKind
28+ ? { bootstrapContextRunKind: params.bootstrapContextRunKind }
29+ : {}),
2430authProfileStore: {
2531version: 1,
2632profiles: Object.fromEntries(
@@ -80,6 +86,53 @@ describe("Codex app-server native code mode config", () => {
8086"features.code_mode_only": true,
8187});
8288});
89+90+it("disables native Codex project docs for lightweight context threads", () => {
91+const request = buildThreadStartParams(
92+createAttemptParams({
93+provider: "openai",
94+bootstrapContextMode: "lightweight",
95+bootstrapContextRunKind: "cron",
96+}),
97+{
98+cwd: "/repo",
99+dynamicTools: [],
100+appServer: createAppServerOptions() as never,
101+developerInstructions: "test instructions",
102+config: {
103+project_doc_max_bytes: 64_000,
104+"features.codex_hooks": true,
105+},
106+},
107+);
108+109+expect(request.config).toEqual({
110+project_doc_max_bytes: 0,
111+"features.codex_hooks": true,
112+"features.code_mode": true,
113+"features.code_mode_only": true,
114+});
115+});
116+117+it("keeps native Codex project docs enabled when context is not lightweight", () => {
118+const request = buildThreadResumeParams(
119+createAttemptParams({ provider: "openai", bootstrapContextRunKind: "cron" }),
120+{
121+threadId: "thread-1",
122+appServer: createAppServerOptions() as never,
123+developerInstructions: "test instructions",
124+config: {
125+project_doc_max_bytes: 64_000,
126+},
127+},
128+);
129+130+expect(request.config).toEqual({
131+project_doc_max_bytes: 64_000,
132+"features.code_mode": true,
133+"features.code_mode_only": true,
134+});
135+});
83136});
8413785138describe("Codex app-server model provider selection", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。