Skip to content

fix: stabilize cli config and gateway update flows - #9327

Open
akillness wants to merge 1 commit into
NousResearch:mainfrom
akillness:fix/cli-config-gateway-stability
Open

fix: stabilize cli config and gateway update flows#9327
akillness wants to merge 1 commit into
NousResearch:mainfrom
akillness:fix/cli-config-gateway-stability

Conversation

@akillness

Copy link
Copy Markdown

Summary

  • preserve Discord/Telegram skill command mappings after 32-char clamp and add regression tests
  • make Hermes .env loading override stale shell env even when PYTHON_DOTENV_DISABLED=1
  • keep first-install tools flow CLI-only and fix gateway/systemd + provider-config regression coverage
  • add missing Hugging Face model metadata entry and harden related tests against ambient Copilot auth

Verification

  • source venv/bin/activate && python -m pytest tests/hermes_cli/ -q
  • source venv/bin/activate && python -m pytest tests/hermes_cli/test_commands.py tests/cli/test_cli_init.py tests/test_model_tools.py -q

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery labels Apr 27, 2026
jankadlecek added a commit to jankadlecek/hermes-agent that referenced this pull request May 24, 2026
OpenAI's "Enable device code authorization for Codex" toggle in ChatGPT
Settings is broken/missing for many account types since early 2026
(openai/codex NousResearch#9253, NousResearch#9282, NousResearch#9327, NousResearch#9418). Hermes dashboard's KEYS →
Codex LOGIN button uses device code internally, so it fails out of the
box. Local `codex login` uses PKCE with a localhost callback and is
unaffected, so let the operator do that login on their Mac and ship
the resulting tokens to the container via a base64 env var.

The bootstrap runs once when CODEX_AUTH_JSON_B64 is set AND the Hermes
auth store does not yet exist on the volume. It writes both the Codex
CLI shared file and the Hermes auth.json with active_provider set to
"openai-codex", so Hermes's auto-detect picks Codex without needing
any further dashboard interaction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the regression-focused work. There is still a real first-install scope bug, but this branch needs selective salvage onto current main.

Problems

  • hermes_cli/tools_config.py:3973-4004 still detects token-configured platforms and loops through all of them during first_install=True; the CLI-only fix remains needed.
  • The dotenv replacement cannot be transplanted unchanged: current hermes_cli/env_loader.py:154-164 uses load_dotenv() and then _sanitize_loaded_credentials(), which the proposed parser omits. The PR also adds no test with PYTHON_DOTENV_DISABLED=1.
  • Command-key preservation already exists in hermes_cli/commands.py:722-758 with coverage at tests/hermes_cli/test_commands.py:1141-1211. agent/model_metadata.py:340 already has the MiniMax entry at the official 204800 value from d442f25a2f41cd55281ca09c967bce9a93203e5c; do not reintroduce 1048576.

Suggested changes

  • Re-scope to the first-install fix with a messaging-token regression test.
  • Rework the dotenv fix against the current loader while preserving its parser and credential-sanitization behavior, and test the disabled flag explicitly.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit area/install-update Installer, updater, packaging, wheels, doctor labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants