mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-17 09:41:58 +00:00
Add a --worktree (-w) flag to the hermes CLI that creates an isolated git worktree for the session. This allows running multiple hermes-agent instances concurrently on the same repo without file collisions. How it works: - On startup with -w: detects git repo, creates .worktrees/<session>/ with its own branch (hermes/<session-id>), sets TERMINAL_CWD to it - Each agent works in complete isolation — independent HEAD, index, and working tree, shared git object store - On exit: auto-removes worktree and branch if clean, warns and keeps if there are uncommitted changes - .worktreeinclude file support: list gitignored files (.env, .venv/) to auto-copy/symlink into new worktrees - .worktrees/ is auto-added to .gitignore - Agent gets a system prompt note about the worktree context - Config support: set worktree: true in config.yaml to always enable Usage: hermes -w # Interactive mode in worktree hermes -w -q "Fix issue #123" # Single query in worktree # Or in config.yaml: worktree: true Includes 17 tests covering: repo detection, worktree creation, independence verification, cleanup (clean/dirty), .worktreeinclude, .gitignore management, and 10 concurrent worktrees. Closes #652 |
||
|---|---|---|
| .. | ||
| agent | ||
| cron | ||
| fakes | ||
| gateway | ||
| hermes_cli | ||
| honcho_integration | ||
| integration | ||
| tools | ||
| __init__.py | ||
| conftest.py | ||
| test_413_compression.py | ||
| test_api_key_providers.py | ||
| test_atomic_json_write.py | ||
| test_auth_codex_provider.py | ||
| test_auth_nous_provider.py | ||
| test_batch_runner_checkpoint.py | ||
| test_cli_init.py | ||
| test_cli_provider_resolution.py | ||
| test_codex_execution_paths.py | ||
| test_codex_models.py | ||
| test_external_credential_detection.py | ||
| test_flush_memories_codex.py | ||
| test_hermes_state.py | ||
| test_honcho_client_config.py | ||
| test_insights.py | ||
| test_model_tools.py | ||
| test_provider_parity.py | ||
| test_run_agent.py | ||
| test_run_agent_codex_responses.py | ||
| test_runtime_provider_resolution.py | ||
| test_timezone.py | ||
| test_toolset_distributions.py | ||
| test_toolsets.py | ||
| test_trajectory_compressor.py | ||
| test_worktree.py | ||