Skip to content

fix(honcho): write config to instance-local path for profile isolation#4037

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-a866ff99
Mar 30, 2026
Merged

fix(honcho): write config to instance-local path for profile isolation#4037
teknium1 merged 1 commit into
mainfrom
hermes/hermes-a866ff99

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fixes the bug where multiple agents/profiles running hermes honcho setup all write to the shared global ~/.honcho/config.json, overwriting each other's configuration.

Reported by stridell on Discord.

Root Cause

_write_config() in honcho_integration/cli.py defaulted to resolve_config_path() which returns the global ~/.honcho/config.json when no instance-local file exists yet — i.e. on every first setup. All profiles' first setup writes hit the same file.

Fix

  • Added _local_config_path() which always returns $HERMES_HOME/honcho.json
  • Changed _write_config() to default to _local_config_path() instead of _config_path()
  • Reading still falls back to global via resolve_config_path() for cross-app interop and seeding initial values
  • Updated cmd_setup and cmd_status messaging to show the correct write path

Behavior After Fix

Operation Path Used
Read (no local file) ~/.honcho/config.json (global fallback)
Read (local file exists) $HERMES_HOME/honcho.json
Write (all commands) $HERMES_HOME/honcho.json (always)

First setup: reads from global (seeds values), writes to local. Subsequent operations: reads and writes the local file. Each profile is fully isolated.

Tests

10 new tests in tests/honcho_integration/test_config_isolation.py:

  • _local_config_path always returns instance-local path
  • Write creates local file, doesn't touch global
  • Read falls back to global when no local file exists
  • Local takes priority over global on read
  • Two profiles get fully separate configs
  • First setup seeds from global, writes to local

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
@erosika

erosika commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

This is the right fix -- instance-local writes with global read fallback is the correct isolation model.

#3999 (profile-scoped Honcho host/peer resolution + observability) builds on the same surface. I'll rebase it on top of this once it lands. The two are complementary -- this PR fixes the write path, #3999 adds per-profile host derivation, auto-clone on profile creation, and cross-profile observability (status --all, peers, enable/disable, sync).

No conflicts on the read side. The rebase is mechanical -- clone_honcho_for_profile and cmd_sync will use _local_config_path() for writes, and _all_profile_host_configs will scan profile dirs instead of reading one shared file.

@teknium1 teknium1 merged commit 3d47af0 into main Mar 30, 2026
2 of 3 checks passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
NousResearch#4037)

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
NousResearch#4037)

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
NousResearch#4037)

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
NousResearch#4037)

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
NousResearch#4037)

Multiple agents/profiles running 'hermes honcho setup' all wrote to
the shared global ~/.honcho/config.json, overwriting each other's
configuration.

Root cause: _write_config() defaulted to resolve_config_path() which
returns the global path when no instance-local file exists yet (i.e.
on first setup).

Fix: _write_config() now defaults to _local_config_path() which always
returns $HERMES_HOME/honcho.json. Each profile gets its own config file.
Reading still falls back to global for cross-app interop and seeding.

Also updates cmd_setup and cmd_status messaging to show the actual
write path.

Includes 10 new tests verifying profile isolation, global fallback
reads, and multi-profile independence.
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.

2 participants