|
|
@@ -19,7 +19,7 @@ export const DISABLED_FEATURES = {
|
|
|
apps: false,
|
|
|
tool_suggest: false,
|
|
|
skill_mcp_dependency_install: false,
|
|
|
- // 子代理的事件与审批不经过 AgentServer
|
|
|
+ // 子代理的事件与审批不经过 AgentServer。只关这个开关不够,真正生效的是下面的 agents.enabled = false
|
|
|
multi_agent: false,
|
|
|
browser_use: false,
|
|
|
computer_use: false,
|
|
|
@@ -33,6 +33,7 @@ export interface CodexThreadConfig {
|
|
|
permissions: Record<string, { filesystem: FsTable; network: { enabled: boolean } }>
|
|
|
shell_environment_policy: { inherit: 'core'; set: Record<string, string> }
|
|
|
features: Record<string, boolean>
|
|
|
+ agents: { enabled: boolean }
|
|
|
[key: string]: unknown
|
|
|
}
|
|
|
|
|
|
@@ -82,6 +83,9 @@ export function buildThreadConfig(opts: {
|
|
|
const agentDir = path.join(access.workspaceDir, '.agent')
|
|
|
return {
|
|
|
features: opts.allowPlugins ? { ...DISABLED_FEATURES, plugins: true, remote_plugin: true, apps: true } : { ...DISABLED_FEATURES },
|
|
|
+ // 关闭子代理(collaboration.spawn_agent 等)。已实测(2026-10-23,codex 0.164):只设 features.multi_agent = false 时
|
|
|
+ // 模型仍能创建并等待子代理;加上 agents.enabled = false 后工具消失。Playground 同样关闭
|
|
|
+ agents: { enabled: false },
|
|
|
// 未开放插件时,即使有应用被启用也不暴露连接器工具
|
|
|
apps: opts.allowPlugins ? { _default: { enabled: true } } : { _default: { enabled: false, destructive_enabled: false, open_world_enabled: false } },
|
|
|
default_permissions: PROFILE_NAME,
|