hermes-agent/tests/cli
Teknium 0824ba6a9d
fix(/branch): redirect session_log_file and expose branch sessions in list (#14854) (#16150)
* fix(/branch): redirect session_log_file and expose branch sessions in list

Two bugs when using /branch:

1. cli.py _handle_branch_command updated agent.session_id but not
   agent.session_log_file, so all messages written after branching
   landed in the original session's JSON file and the branch never
   got its own session_{id}.json on disk.

   Fix: mirror the compression-split path (run_agent.py:7579) and
   update session_log_file immediately after changing session_id.

2. hermes_state.py list_sessions_rich filtered out every session
   with parent_session_id IS NOT NULL to hide sub-agent runs and
   compression continuations. Branch sessions share this column, so
   they became invisible to `hermes sessions list` and `sessions browse`.

   Fix: also include branch children — those whose parent ended with
   end_reason='branched' AND whose started_at >= parent.ended_at
   (the same timing condition that get_compression_tip uses to
   distinguish continuations from live-spawned subagents).

Fixes #14854

Co-Authored-By: Octopus <liyuan851277048@icloud.com>

* chore(release): map octo-patch placeholder email in AUTHOR_MAP

---------

Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: Octopus <liyuan851277048@icloud.com>
2026-04-26 10:28:19 -07:00
..
__init__.py
test_branch_command.py fix(/branch): redirect session_log_file and expose branch sessions in list (#14854) (#16150) 2026-04-26 10:28:19 -07:00
test_busy_input_mode_command.py feat: add slash command for busy input mode 2026-04-24 15:15:26 -07:00
test_cli_approval_ui.py test(approval): regression guards for thread-local callback contract 2026-04-21 14:29:08 -07:00
test_cli_background_tui_refresh.py
test_cli_browser_connect.py
test_cli_context_warning.py
test_cli_copy_command.py
test_cli_extension_hooks.py
test_cli_external_editor.py
test_cli_file_drop.py
test_cli_image_command.py
test_cli_init.py
test_cli_interrupt_subagent.py
test_cli_loading_indicator.py
test_cli_markdown_rendering.py Rename test variables 2026-04-21 16:00:34 -03:00
test_cli_mcp_config_watch.py
test_cli_new_session.py refactor(memory): remove flush_memories entirely (#15696) 2026-04-25 08:21:14 -07:00
test_cli_prefix_matching.py
test_cli_preloaded_skills.py
test_cli_provider_resolution.py
test_cli_retry.py
test_cli_save_config_value.py
test_cli_secret_capture.py
test_cli_skin_integration.py
test_cli_status_bar.py
test_cli_status_command.py
test_cli_steer_busy_path.py
test_cli_tools_command.py
test_cli_user_message_preview.py
test_compress_focus.py
test_cwd_env_respect.py
test_fast_command.py
test_gquota_command.py
test_manual_compress.py
test_personality_none.py
test_quick_commands.py fix(tests): resolve 17 persistent CI test failures (#15084) 2026-04-24 03:46:46 -07:00
test_reasoning_command.py
test_resume_display.py
test_session_boundary_hooks.py
test_stream_delta_think_tag.py
test_surrogate_sanitization.py
test_tool_progress_scrollback.py
test_worktree_security.py
test_worktree.py