From 9c2c8b4dd0f476fba5ea275907e17632113a9b1d Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 2 Feb 2026 10:49:07 +0900 Subject: [PATCH] feat(config): add default_run_agent schema option Add optional 'default_run_agent' field to OhMyOpenCodeConfig schema. This field allows users to configure the default agent for the 'run' command via oh-my-opencode.json configuration file. - Add Zod schema: z.string().optional() - Regenerate JSON schema for IDE support --- assets/oh-my-opencode.schema.json | 3 +++ src/config/schema.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 658e17786..af48d80b4 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -11,6 +11,9 @@ "new_task_system_enabled": { "type": "boolean" }, + "default_run_agent": { + "type": "string" + }, "disabled_mcps": { "type": "array", "items": { diff --git a/src/config/schema.ts b/src/config/schema.ts index 293435adc..abdfd0048 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -366,6 +366,8 @@ export const OhMyOpenCodeConfigSchema = z.object({ $schema: z.string().optional(), /** Enable new task system (default: false) */ new_task_system_enabled: z.boolean().optional(), + /** Default agent name for `oh-my-opencode run` (env: OPENCODE_DEFAULT_AGENT) */ + default_run_agent: z.string().optional(), disabled_mcps: z.array(AnyMcpNameSchema).optional(), disabled_agents: z.array(BuiltinAgentNameSchema).optional(), disabled_skills: z.array(BuiltinSkillNameSchema).optional(),