Skip to content

fix: deep-merge CLI agent-config with config file values - #636

Merged
dwash96 merged 1 commit into
cecli-dev:v1.2.0from
devsoft-co-za:fix/agent-config-cli-merge
Aug 12, 2026
Merged

fix: deep-merge CLI agent-config with config file values#636
dwash96 merged 1 commit into
cecli-dev:v1.2.0from
devsoft-co-za:fix/agent-config-cli-merge

Conversation

@devsoft-co-za

Copy link
Copy Markdown

OK here is the right one (I hope). Previously based PR off of experimental branch by mistake..

Recently I had an issue adding a skill to local cecli.conf.yml - it wasn't picked up. I asked Cecli to investigate and it ended up patching itself. Apparently the way the home directory and working directory configs are parsed was not working right when certain arguments were also included - resulted in my local skill not being recognized on startup.

Please have a look and see if this might help.

What I did:
Added a new skill to local directory

What happened:
The skill was not shown in "skills"

Command in question:
cecli --agent-config '{"command_timeout": 0, "skip_cli_confirmations": true}' --model deepseek/deepseek-v4-flash --editor-model deepseek/deepseek-v4-flash

My cecli.conf.yml for reference:

dark-mode: true
light-mode: false
agent: true
analytics: false
auto-commits: true
auto-save: true
auto-load: false
cache-prompts: true
check-update: true
debug: false
enable-context-compaction: true
multiline: false
preserve-todo-list: true
show-model-warnings: true
watch-files: false
tui: false

disable-playwright: true
yes-always: true

agent-config: |
  {
    "skills_paths": ["~/skills", "./.cecli/skills"],
    "skills_init": ["android-cli"],
    "large_file_token_threshold": 12500,
    "skip_cli_confirmations": true
  }

mcp-servers: |
  {
    "mcpServers": {
      "context7": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@upstash/context7-mcp"],
        "env": {
          "DEFAULT_MINIMUM_TOKENS": "6000"
        },
        "autoApprove": ["resolve-library-id", "get-library-docs"],
        "alwaysAllow": ["resolve-library-id", "get-library-docs"]
      },
      "fetch": {
        "type": "stdio",
        "command": "uvx",
        "args": ["--with", "mcp<2", "mcp-server-fetch"]
      },
      "brainfile": {
        "type": "stdio",
        "command": "npx",
        "args": ["@brainfile/cli", "mcp"]
      },
      "sequential-thinking": {
        "type": "stdio",
        "command": "npx",
        "args": [
            "-y",
            "@modelcontextprotocol/server-sequential-thinking"
        ]
        },
        "kitesurf": {
              "type": "stdio",
              "command": "npx",
              "args": [
                "-y",
                "chrome-devtools-mcp@latest",
                "--wsEndpoint=wss://kitesurf.cloudflare.app/devtools/browser"
              ],
              "enabled": true
            }
    }
  }

Skill is android-cli (in .cecli/skills)

Notification before patch:

cecli v1.0.5.dev+less
Models         deepseek-v4-flash (main)
Settings       agent (edit format)
Environment    no git repo • repo-map disabled
 ├─ Subagents  memorizer • worker
 └─ Servers    fetch • context7 • kitesurf • sequential-thinking • brainfile • Local

Notification after patch:

cecli v1.0.5.dev+less
Models         deepseek-v4-flash (main)
Settings       agent (edit format)
Environment    no git repo • repo-map disabled
 ├─ Subagents  memorizer • worker
 ├─ Skills     android-cli
 └─ Servers    kitesurf • sequential-thinking • context7 • fetch • brainfile • Local

dwash96 pushed a commit that referenced this pull request Aug 12, 2026
Fold the agent-config deep-merge from PR #636 into
convert_yaml_to_json_string(value, config_file_value=None) so --agent-config
isn't parsed differently from the other yaml-to-json args. All such args
(agent_config, tui_config, mcp_servers, custom, security_config, retries,
hooks, workspaces, model_providers, server_config) now deep-merge with the
value for their hyphenated config-file key (CLI wins per-key, file-only keys
preserved; underscore-key variants unsupported). Parsing now uses json.loads
first so JSON booleans/null parse correctly before falling back to
ast.literal_eval for Python-literal forms.
@dwash96
dwash96 changed the base branch from main to v1.2.0 August 12, 2026 01:35
@dwash96
dwash96 merged commit baed949 into cecli-dev:v1.2.0 Aug 12, 2026
12 checks passed
@dwash96 dwash96 mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants