{"record":{"id":"bb3272e3ff0ddd4b","repo":"iOfficeAI/OfficeCLI","slug":"plugin-failed-bb3272","errorCode":"plugin_failed","errorMessage":"Dump-reader plugin '{plugin.Manifest.Name}' failed (exit {result.ExitCode}): {Truncate(result.Stderr, 500)}","messagePattern":"Dump-reader plugin '(.+?)' failed \\(exit (.+?)\\): (.+?)","errorType":"exception","errorClass":"CliException","httpStatus":null,"severity":"error","filePath":"src/officecli/Core/Plugins/DumpReaderInvoker.cs","lineNumber":126,"sourceCode":"            // actionable than the generic non-zero exit that follows.\n            if (PluginProcess.LineCallbackError is CliException ce)\n                throw ce;\n            if (PluginProcess.LineCallbackError is not null)\n                throw new CliException(\n                    $\"Dump-reader plugin '{plugin.Manifest.Name}' replay aborted: {PluginProcess.LineCallbackError.Message}\",\n                    PluginProcess.LineCallbackError)\n                { Code = \"plugin_command_failed\" };\n\n            if (result.IdleTimedOut)\n                throw new CliException(\n                    $\"Dump-reader plugin '{plugin.Manifest.Name}' produced no output for {idle}s — likely hung.\")\n                {\n                    Code = \"plugin_idle_timeout\",\n                    Suggestion = $\"Override with --timeout 0 or set a longer `idle_timeout_seconds.verbs.dump` in the plugin's manifest.\",\n                };\n\n            if (result.ExitCode != 0)\n                throw new CliException(\n                    $\"Dump-reader plugin '{plugin.Manifest.Name}' failed (exit {result.ExitCode}): {Truncate(result.Stderr, 500)}\")\n                {\n                    Code = result.ExitCode switch\n                    {\n                        2 => \"corrupt_input\",\n                        3 => \"unsupported_feature\",\n                        4 => \"license_expired\",\n                        5 => \"protocol_mismatch\",\n                        6 => \"plugin_idle_timeout\",\n                        _ => \"plugin_failed\",\n                    },\n                };\n\n            // v6.4: now that the plugin has exited and all JSONL is buffered,\n            // open the handler on this thread and replay synchronously. See\n            // the rationale comment at the bufferedLines declaration above\n            // (OpenXml SDK package state not thread-safe under heavy\n            // multi-part Update-mode mutation).","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Core/Plugins/DumpReaderInvoker.cs#L108-L144","documentation":"CliException thrown when the dump-reader exits non-zero. Code is mapped from the exit code: 2=corrupt_input, 3=unsupported_feature, 4=license_expired, 5=protocol_mismatch, 6=plugin_idle_timeout, otherwise plugin_failed. Stderr is truncated to 500 chars via DisplayText.Truncate.","triggerScenarios":"Plugin process returns any non-zero exit code after PluginProcess.Run completes. The idle-timeout and line-callback-error paths are checked first and short-circuit before this.","commonSituations":"Source file the plugin cannot parse (exit 2); plugin feature gap (exit 3); license/subscription expired (exit 4); host/plugin protocol version skew (exit 5).","solutions":["Read the mapped code and truncated stderr in the message — they name the failure class.","For corrupt_input (2): validate the source file opens in its native app.","For license_expired (4): refresh the plugin's license/subscription.","For unsupported_feature (3) / protocol_mismatch (5): upgrade the plugin to match the host."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { DumpReaderInvoker.Run(source, ext); }\ncatch (CliException ex) when (ex.Code is \"corrupt_input\" or \"unsupported_feature\" or \"license_expired\" or \"protocol_mismatch\" or \"plugin_failed\")\n{ /* branch on ex.Code for user-facing guidance */ }","preventionTips":["Branch on ex.Code rather than parsing the message string.","Pre-validate source files before invoking the plugin for corrupt_input (2).","Track license expiry proactively to avoid license_expired (4) at runtime."],"tags":["plugins","dump-reader","exit-code","cli-exception"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}