Skip to content

kcap update never registers new Codex MCP servers #807

Closed

Description

@alexeyzimarev

Problem

kcap update and the npm postinstall refresh the Codex integration through kcap plugin install --codex --if-installed. That branch rewrites ~/.codex/hooks.json, stamps the version marker and returns before the MCP registration step, so ~/.codex/config.toml keeps whatever [mcp_servers] entries the last full install wrote.

A machine set up before kcap-flows, kcap-workitems and kcap-analytics joined the Codex server set (#346, #547, #344) still has only kcap-review, kcap-sessions and kcap-memory, however many updates it has taken since. A Codex session then reports:

The Claude review hasn't started: this session has kcap session and review-context tools, but no flow tools. Reconnect kcap-flows, or run kcap setup and restart the session.

and the review-flow skill refuses to work around it by design.

Copilot's refresh heals its MCP registration on every run; Codex's never does.

Reproduce

  1. Seed ~/.codex/config.toml with only the three legacy entries, and ~/.codex/hooks.json with a stale marker or none.
  2. Run kcap plugin install --codex --if-installed.
  3. Output is Codex hooks refreshed (...); config.toml is unchanged and has no kcap-flows.

Observed on 0.11.39: last kcap setup on 2026-07-06, only kcap update since. Hooks and skills carry the update's timestamp, config.toml was never touched, and no mcp-ownership-v1.json exists.

Expected

The refresh adds missing kcap servers whether or not the hooks file needed rewriting. The registration is already idempotent and leaves user entries alone, so healing it on refresh is safe.

Workaround

Run the full install, kcap plugin install --codex, then start a new Codex session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions