affaan-m/ECC · warning

[ecc-codex] WARNING

Error message

[ecc-codex] WARNING: ${message}

What it means

merge-codex-config.js prints `[ecc-codex] WARNING: <message>` through its warn() helper for non-fatal merge conditions encountered while merging ECC config into the Codex config file. The merge continues; the warning flags something the user should review (e.g. an unsafe skip or drift from the recommendation).

Solutions

  1. Read the message after 'WARNING:' to identify the affected config section
  2. Open the target config file and manually add or align the affected keys
  3. Re-run the merge script to confirm the warning disappears
  4. If drift is the cause, re-run with --update-mcp (for MCP-related warnings) to sync to the ECC recommendation

Example fix

// before (manual review needed)
$ node scripts/codex/merge-codex-config.js
[ecc-codex] WARNING: Skipping missing keys for [mcp_servers.x]...
// after (fix TOML by hand, then rerun)
$ node scripts/codex/merge-codex-config.js
[ecc-codex] updated config
Defensive patterns

Strategy: validation

Validate before calling

// ensure tables have standalone headers before merging
toml.parse(configText); // parse first; fix parse/layout issues before running the merge

Prevention

When it happens

Trigger: Any code path in the merge (notably appendToTable, via the caller chain warn <- appendToTable) that detects a condition it cannot fix automatically, such as a TOML table it cannot safely modify.

Common situations: Running the Codex config merge against a hand-edited or non-standard .codex config file where a table is embedded in a larger structure, or running without --update-mcp while drift exists.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/b15fa9c74300c379. Report an issue: GitHub.

Appendix: source

Thrown at scripts/codex/merge-codex-config.js:43

const ROOT_KEYS = ['approval_policy', 'sandbox_mode', 'web_search', 'notify', 'persistent_instructions'];
const TABLE_PATHS = [
  'features',
  'profiles.strict',
  'profiles.yolo',
  'agents',
  'agents.explorer',
  'agents.reviewer',
  'agents.docs_researcher',
];
const TOML_HEADER_RE = /^[ \t]*(?:\[[^[\]\n][^\]\n]*\]|\[\[[^[\]\n][^\]\n]*\]\])[ \t]*(?:#.*)?$/m;

function log(message) {
  console.log(`[ecc-codex] ${message}`);
}

function warn(message) {
  console.warn(`[ecc-codex] WARNING: ${message}`);
}

function getNested(obj, pathParts) {
  let current = obj;
  for (const part of pathParts) {
    if (!current || typeof current !== 'object' || !(part in current)) {
      return undefined;
    }
    current = current[part];
  }
  return current;
}

function setNested(obj, pathParts, value) {
  let current = obj;
  for (let i = 0; i < pathParts.length - 1; i += 1) {
    const part = pathParts[i];
    if (!current[part] || typeof current[part] !== 'object' || Array.isArray(current[part])) {

View on GitHub (pinned to 8321021c54)