fix(tools): propagate startWorkConfig through skill tool and registry

SkillLoadOptions and createSkillTool now accept startWorkConfig and forward it to discoverCommandsSync. tool-registry passes pluginConfig.start_work to both call sites so the skill tool description and skill(name="start-work") invocation honour the worktree config flag.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
acamq
2026-03-11 19:40:55 -06:00
parent 317c402afe
commit 53b604ed2a
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -105,6 +105,7 @@ export function createToolRegistry(args: {
const commands = discoverCommandsSync(ctx.directory, {
pluginsEnabled: pluginConfig.claude_code?.plugins ?? true,
enabledPluginsOverride: pluginConfig.claude_code?.plugins_override,
startWorkConfig: pluginConfig.start_work,
})
const skillTool = createSkillTool({
commands,
@@ -112,6 +113,7 @@ export function createToolRegistry(args: {
mcpManager: managers.skillMcpManager,
getSessionID: getSessionIDForMcp,
gitMasterConfig: pluginConfig.git_master,
startWorkConfig: pluginConfig.start_work,
})
const taskSystemEnabled = pluginConfig.experimental?.task_system ?? false
+1
View File
@@ -199,6 +199,7 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
cachedCommands = discoverCommandsSync(undefined, {
pluginsEnabled: options.pluginsEnabled,
enabledPluginsOverride: options.enabledPluginsOverride,
startWorkConfig: options.startWorkConfig,
})
return cachedCommands
}
+2
View File
@@ -37,4 +37,6 @@ export interface SkillLoadOptions {
pluginsEnabled?: boolean
/** Override plugin enablement from Claude settings by plugin key */
enabledPluginsOverride?: Record<string, boolean>
/** start-work command configuration, controls worktree instructions in /start-work template */
startWorkConfig?: { worktree?: boolean }
}