mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
When a user runs `hermes -w -c Pokemon Agent Dev` without quoting the session name, argparse would fail with: error: argument command: invalid choice: 'Agent' This is because argparse parses `-c Pokemon` (consuming one token via nargs='?'), then sees 'Agent' and tries to match it as a subcommand. Fix: add _coalesce_session_name_args() that pre-processes sys.argv before argparse, joining consecutive non-flag, non-subcommand tokens after -c or -r into a single argument. This makes both quoted and unquoted multi-word session names work transparently. Includes 17 tests covering all edge cases: multi-word names, single-word, bare flags, flag ordering, subcommand boundaries, and passthrough. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_coalesce_session_args.py | ||
| test_commands.py | ||
| test_config.py | ||
| test_doctor.py | ||
| test_model_validation.py | ||
| test_models.py | ||
| test_session_browse.py | ||
| test_set_config_value.py | ||
| test_skills_hub.py | ||
| test_tools_config.py | ||