{"record":{"id":"c337217b2c59529d","repo":"can1357/oh-my-pi","slug":"plugin-name-not-found-in-runtime-config","errorCode":null,"errorMessage":"Plugin ${name} not found in runtime config","messagePattern":"Plugin (.+?) not found in runtime config","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensibility/plugins/manager.ts","lineNumber":840,"sourceCode":"\t\t\tversion: pkg.version,\n\t\t\tpath: absolutePath,\n\t\t\tmanifest,\n\t\t\tenabledFeatures: null,\n\t\t\tenabled: true,\n\t\t};\n\t}\n\n\t// ==========================================================================\n\t// Enable / Disable\n\t// ==========================================================================\n\n\t/**\n\t * Enable or disable a plugin globally.\n\t */\n\tasync setEnabled(name: string, enabled: boolean): Promise<void> {\n\t\tconst config = await this.#ensureConfigLoaded();\n\t\tif (!config.plugins[name]) {\n\t\t\tthrow new Error(`Plugin ${name} not found in runtime config`);\n\t\t}\n\t\tconfig.plugins[name].enabled = enabled;\n\t\tawait this.#saveRuntimeConfig();\n\t}\n\n\t// ==========================================================================\n\t// Features\n\t// ==========================================================================\n\n\t/**\n\t * Get enabled features for a plugin.\n\t */\n\tasync getEnabledFeatures(name: string): Promise<string[] | null> {\n\t\tconst config = await this.#ensureConfigLoaded();\n\t\treturn config.plugins[name]?.enabledFeatures ?? null;\n\t}\n\n\t/**","sourceCodeStart":822,"sourceCodeEnd":858,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/extensibility/plugins/manager.ts#L822-L858","documentation":"PluginManager.setEnabled(name, enabled) validates that the plugin has an entry in the loaded runtime config's plugins map before mutating it. If no runtime-config entry exists under that name, it throws rather than silently creating one. This means the plugin was never installed/registered through the manager (or the config key differs).","triggerScenarios":"Calling setEnabled(\"foo\", true|false) where config.plugins has no \"foo\" key; toggling a plugin by display name or package path instead of its registered config name; config file edited or reset so the entry disappeared.","commonSituations":"Plugin was removed or never installed; renaming a plugin without updating scripts; stale automation scripts referencing an old plugin name; corrupted/trimmed runtime config.","solutions":["List installed plugins (e.g. manager.listPlugins() or the CLI's plugin list) and use the exact registered name.","Install the plugin first — setEnabled only toggles already-registered entries.","Inspect the runtime config file and confirm the plugins map key spelling (case-sensitive).","If the entry is missing but the plugin exists, reinstall it to recreate the config entry."],"exampleFix":"// before\nawait manager.setEnabled(\"MyPlugin\", true); // not a registered key\n// after\nawait manager.setEnabled(\"my-plugin\", true); // exact config key","handlingStrategy":"try-catch","validationCode":"const config = await manager.getRuntimeConfig?.() ?? /* or read config */ null;\nconst names = new Set(Object.keys(config?.plugins ?? {}));\nif (!names.has(pluginName)) {\n  throw new Error(`Unknown plugin: ${pluginName}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await manager.setEnabled(name, true);\n} catch (err) {\n  if (err instanceof Error && /not found in runtime config/.test(err.message)) {\n    console.error(`\"${name}\" is not installed; run install first`);\n  } else throw err;\n}","preventionTips":["List registered plugins and match exact names before toggling","Install plugins through the manager so config entries are created","Avoid renaming plugins that automation scripts reference","Treat runtime-config keys as case-sensitive identifiers"],"tags":["plugins","configuration","runtime-config","not-found"],"backgroundTag":"config-key-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}