{"record":{"id":"66d507acb37b7bc4","repo":"openai/codex","slug":"failed-to-load-marketplace-s-issue-lines","errorCode":null,"errorMessage":"failed to load marketplace(s):\n{issue_lines}","messagePattern":"failed to load marketplace\\(s\\):\n(.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/marketplace_cmd.rs","lineNumber":251,"sourceCode":"                path: error.path.to_path_buf(),\n                message: error.message.clone(),\n            });\n        }\n    }\n    if !load_issues.is_empty() {\n        let issue_lines = load_issues\n            .iter()\n            .map(|issue| {\n                format!(\n                    \"- `{}` at {}: {}\",\n                    issue.marketplace_name,\n                    issue.path.display(),\n                    issue.message\n                )\n            })\n            .collect::<Vec<_>>()\n            .join(\"\\n\");\n        bail!(\"failed to load marketplace(s):\\n{issue_lines}\");\n    }\n    let marketplaces = marketplace_listing.marketplaces;\n    if args.json {\n        let marketplace_sources =\n            configured_marketplace_sources_by_root(config.codex_home.as_path(), &plugins_input);\n        let output =\n            JsonMarketplaceListOutput::from_marketplaces(marketplaces, &marketplace_sources);\n        println!(\"{}\", serde_json::to_string_pretty(&output)?);\n        return Ok(());\n    }\n\n    if marketplaces.is_empty() {\n        println!(\"No plugin marketplaces in scope.\");\n        return Ok(());\n    }\n\n    let mut seen_roots = HashSet::new();\n    let mut rows = Vec::new();","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/marketplace_cmd.rs#L233-L269","documentation":"`codex marketplace list` discovers configured plugin marketplaces, then aggregates load issues from configured_marketplace_snapshot_issues plus raw discovery errors from the plugins manager. If any issue exists, run_list bails with one line per problem (`- `name` at path: message`) and suppresses the listing — a marketplace that cannot load cleanly is a hard failure, not a warning.","triggerScenarios":"Any configured marketplace whose snapshot fails to load: unparseable marketplace manifest YAML at the printed path, a marketplace directory deleted or moved after being configured, or a discovery error reported for a configured source.","commonSituations":"Hand-editing marketplace YAML under $CODEX_HOME and breaking syntax; rm-ing a cloned marketplace directory without removing its config entry; a codex upgrade changing the manifest schema; CODEX_HOME pointing at a partial copy from another machine.","solutions":["Read each `- `name` at path: message` line; open that exact path.","Fix the manifest or directory at the reported path (restore the deleted clone, correct the YAML).","Remove the stale entry with `codex marketplace remove <name>` and re-add via `codex marketplace add <source>` if still needed.","Rerun `codex marketplace list` to confirm a clean load."],"exampleFix":"# error output looks like:\n# failed to load marketplace(s):\n# - `acme` at /home/me/.codex/plugins/marketplaces/acme/marketplace.yaml: invalid YAML\n# fix: correct or remove that marketplace, then rerun\ncodex marketplace remove acme\ncodex marketplace add https://github.com/acme/marketplace\ncodex marketplace list","handlingStrategy":"validation","validationCode":"CODEX_HOME=\"${CODEX_HOME:-$HOME/.codex}\"\npython3 - \"$CODEX_HOME\" <<'PY'\nimport glob, os, sys, yaml\nhome = sys.argv[1]\nbad = []\nfor p in glob.glob(os.path.join(home, 'plugins', '**', '*.yaml'), recursive=True):\n    try:\n        yaml.safe_load(open(p))\n    except Exception as e:\n        bad.append(f'{p}: {e}')\nif bad:\n    print('invalid marketplace yaml:'); print(chr(10).join(bad)); sys.exit(1)\nPY\ncodex marketplace list","typeGuard":null,"tryCatchPattern":"if ! codex marketplace list 2>err.log; then\n  sed -n '/failed to load marketplace/,$p' err.log   # one `- `name` at path: message` line per issue\n  exit 1\nfi","preventionTips":["Add and remove marketplaces only through codex CLI commands, never by hand-editing config","Run codex marketplace list after each add/remove to catch breakage early","Keep $CODEX_HOME backed up or versioned so a broken manifest is one revert away"],"tags":["cli","codex","marketplace","plugins","yaml"],"backgroundTag":"config-validation-failed","analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}