Skip to content

Hermes integration treats external config changes as whole-file conflicts and risks destructive clobber on replace #3989

Description

@rrmlima

Client or integration

Other

Area

Dashboard

Summary

Hermes Agent is an autonomous multi-provider agent whose configuration (~/.hermes/config.yaml) typically hosts multiple providers (e.g., Command Code, OpenCode, local models, auxiliary vision models) alongside user comments and runtime settings.

In src/clients/config-export.ts, the Hermes export is documented with the clear design invariant:
"Hermes ~/.hermes/config.yaml. We emit ONLY the provider entry — never model.default — because hijacking the user's main model is not what a connect action asks for."

However, in src/integrations/registry.ts, hermes was registered without sourcePreservingYaml: { path: ["providers", "opencodex"] }. Consequently, whenever an operator edits ~/.hermes/config.yaml to configure sibling providers, auxiliary models, or comments, classifyIntegration treats the modification as a whole-file conflict (foreign-edit or unowned-key).

In the dashboard UI, this locks the integration toggle and presents a destructive restore prompt ("Replace") warning that the file will be replaced from a previous snapshot. If confirmed, the user loses all non-OpenCodex providers and customized settings.

Reproduction

  1. Have a valid ~/.hermes/config.yaml containing sibling providers (e.g., commandcode-oauth, opencode-zen) and an auxiliary vision model configuration.
  2. Open the OpenCodex dashboard at http://127.0.0.1:10100/ and navigate to the Integrations tab.
  3. Observe that Hermes reports state: "conflict" with reason unowned-key or foreign-edit instead of recognizing the sibling configuration as independent unowned content.
  4. Clicking the integration presents a modal offering to Replace/Restore the configuration from a snapshot.
  5. If the operator confirms the replace, the entire config.yaml is overwritten by the snapshot, discarding all external providers and settings.

Version

@bitkyc08/opencodex 2.47.0 (and dev commit 2ee9019)

Operating system

Ubuntu 24.04 LTS (Linux 6.8.0-134-generic x86_64)

Provider and model

N/A (Client integrations subsystem)

Logs or error output

{
  "clientId": "hermes",
  "state": "conflict",
  "installed": true,
  "configPath": "/root/.hermes/config.yaml",
  "reason": "unowned-key",
  "snapshotCount": 0,
  "retentionDegraded": false
}

Screenshots and supporting files

Observed in dashboard Integrations table: Hermes row enters conflict state with foreign-edit / unowned-key, locking ordinary toggle and requiring a destructive full-file restore.

Redacted configuration

model:
  default: meituan/LongCat-2.0:free
providers:
  commandcode-oauth:
    models: [ ... ]
  opencode-zen:
    models: [ ... ]
  opencodex:
    api: http://127.0.0.1:10100/v1
    api_key: ${OPENCODEX_HERMES_API_KEY}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingguiDashboard, tray, settings UI

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions