hermes-bsd/agent
teknium1 7ace96ba40 fix(compression): preserve goal, platform, and session indexing across rotation
Three state-loss bugs at the compression rotation boundary, fixed together
because they all live in the same ~80-line rotation block:

- #33618: a persistent /goal did not follow the rotation. load_goal does a
  flat per-session lookup with no lineage walk, so a goal silently died when
  compression minted a fresh child id. Added migrate_goal_to_session() and
  call it after the child session is created (move-not-copy: the parent row
  is archived as cleared so exactly one active goal row exists).

- #33906/#33907: if the child create_session raised (FK constraint,
  contended write), the outer handler only warned and let the agent continue
  on the NEW id — which has no row in state.db — producing an orphan session.
  Now the rotation rolls agent.session_id back to the still-indexed parent
  (reopening it) instead of stranding the conversation on a phantom id.

- #27633: the compaction-boundary on_session_start notification omitted the
  platform kwarg, so context-engine plugins saw source=unknown for every
  message after the boundary. Forward platform (matching the initial
  session-start call in agent_init.py).

Co-authored-by: denisqq <21260182+denisqq@users.noreply.github.com>
Co-authored-by: zccyman <16263913+zccyman@users.noreply.github.com>
Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>
2026-06-20 20:06:24 -07:00
..
lsp fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
secret_sources fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
transports fix(chat-completions): strip timestamp from messages before sending to strict providers 2026-06-20 17:05:17 -07:00
__init__.py
account_usage.py feat(billing): /credits command — balance + portal top-up handoff (#44776) 2026-06-12 08:51:10 +00:00
agent_init.py refactor(compression): tidy in-place compaction path (simplify pass) 2026-06-20 10:57:07 -07:00
agent_runtime_helpers.py fix(agent): keep system-prompt model identity in sync across provider failover 2026-06-20 10:46:01 -07:00
anthropic_adapter.py fix(agent): aggregate anthropic aux calls via stream 2026-06-19 17:32:13 +05:30
async_utils.py
auxiliary_client.py fix(env): guard remaining malformed int/float env var casts with utils helpers 2026-06-20 14:54:36 +05:30
azure_identity_adapter.py
background_review.py fix(mcp): address adversarial review round 1 (cache parity, gates, races) 2026-06-19 11:57:43 -07:00
bedrock_adapter.py fix(bedrock): check boto3 version >= 1.34.59 before using converse_stream 2026-06-15 05:25:17 -07:00
billing_view.py feat(billing): /billing terminal billing — interactive TUI + CLI client (#45449) 2026-06-19 01:53:32 +05:30
browser_provider.py
browser_registry.py
chat_completion_helpers.py fix(agent): keep system-prompt model identity in sync across provider failover 2026-06-20 10:46:01 -07:00
codex_responses_adapter.py fix(xai): OAuth Responses native web_search, incomplete guard, grok-composer context 2026-06-17 17:33:32 -07:00
codex_runtime.py fix(openviking): preserve structured sync attribution 2026-06-19 15:23:41 +08:00
coding_context.py fix(coding): teach agents terminal env state persists 2026-06-11 19:50:08 -05:00
context_compressor.py fix(compression): abort on auth failure instead of rotating into a degraded session 2026-06-20 11:38:21 -07:00
context_engine.py
context_references.py fix(agent): make a binary @file: reference actionable instead of a dead end 2026-06-09 19:16:46 -05:00
conversation_compression.py fix(compression): preserve goal, platform, and session indexing across rotation 2026-06-20 20:06:24 -07:00
conversation_loop.py fix(agent): fail over to fallback provider on persistent auth failure (401/403) 2026-06-20 11:38:01 -07:00
copilot_acp_client.py fix: make profile subprocess HOME policy explicit 2026-06-14 03:20:21 -07:00
credential_persistence.py
credential_pool.py feat(gateway): multiplex phase 2 — fail-closed profile credential isolation (Workstream A) 2026-06-19 07:34:15 -07:00
credential_sources.py
credits_tracker.py feat(billing): /credits command — balance + portal top-up handoff (#44776) 2026-06-12 08:51:10 +00:00
curator.py feat(curator): make skill consolidation opt-in (prune stays default-on) (#47840) 2026-06-17 05:20:32 -07:00
curator_backup.py fix(curator): stop the rollback safety snapshot from pruning its target 2026-06-17 05:40:05 -07:00
display.py fix: harden salvaged session and browser improvements 2026-06-15 07:46:34 -07:00
error_classifier.py fix(agent): route 'thinking blocks cannot be modified' 400 to recovery 2026-06-10 12:39:44 -07:00
errors.py fix(agent,gateway,doctor): add SSL CA cert bundle fail-fast guard 2026-06-13 21:14:32 -07:00
file_safety.py fix(file-safety): relax user-write deny policy (#45947) 2026-06-14 02:07:32 -07:00
gemini_cloudcode_adapter.py
gemini_native_adapter.py fix(gemini): strip native self prefixes before generateContent (#36141) 2026-06-13 13:47:08 -07:00
gemini_schema.py
google_code_assist.py
google_oauth.py
i18n.py fix(packaging): ship locales/ i18n catalogs in wheel, sdist, and Nix (#38383) 2026-06-03 12:00:27 -07:00
image_gen_provider.py feat(image-gen): add image-to-image / editing to image_generate (#48705) 2026-06-18 22:13:07 -07:00
image_gen_registry.py
image_routing.py fix(vision): honor custom_providers per-model supports_vision (#41036) 2026-06-07 21:50:57 -07:00
insights.py refactor(insights): drop dead pricing/duration wrappers, call usage_pricing directly (#40618) 2026-06-07 18:33:20 -07:00
iteration_budget.py
jiter_preload.py
lmstudio_reasoning.py
manual_compression_feedback.py
markdown_tables.py
memory_manager.py fix(memory): log CLI shutdown hook failures 2026-06-19 16:59:43 -07:00
memory_provider.py feat(memory): add rewound kwarg to on_session_switch hook 2026-06-01 01:22:38 -07:00
message_content.py fix(openviking): preserve structured sync attribution 2026-06-19 15:23:41 +08:00
message_sanitization.py revert: drop cumulative-resend tool-arg heuristic from shared streaming path (#35718) (#35860) 2026-05-31 06:14:32 -07:00
model_metadata.py fix(xai): scope native web_search to swap-only + reconcile composer ctx to 200k 2026-06-17 17:33:32 -07:00
models_dev.py
moonshot_schema.py fix(moonshot): handle union type arrays in tool schemas 2026-06-13 05:51:41 -07:00
nous_rate_guard.py
onboarding.py feat(onboarding): opt-in structured profile-build path on first contact (#41114) 2026-06-07 08:36:48 -07:00
plugin_llm.py
portal_tags.py
process_bootstrap.py
prompt_builder.py fix(prompt): dedupe parallel-tool-call steer; correct its rationale 2026-06-18 13:22:12 -05:00
prompt_caching.py
rate_limit_tracker.py
redact.py redact secrets in API request debug dumps 2026-06-15 05:31:21 -07:00
retry_utils.py
runtime_cwd.py fix(desktop): stabilize project folder sessions (#37586) 2026-06-02 20:23:09 +00:00
secret_scope.py feat(gateway): multiplex phase 2 — fail-closed profile credential isolation (Workstream A) 2026-06-19 07:34:15 -07:00
shell_hooks.py
skill_bundles.py
skill_commands.py fix(memory): strip skill scaffolding for all providers, not just openviking 2026-06-16 10:37:37 -07:00
skill_preprocessing.py fix: prevent TUI gateway stdin EOF crash across all TUI-context subprocess calls 2026-06-08 22:46:57 -07:00
skill_utils.py fix(skills): ignore support docs in skill discovery 2026-06-16 13:08:34 -07:00
ssl_guard.py fix(ssl): align guard docs and escape hatch 2026-06-13 21:14:32 -07:00
stream_diag.py
subdirectory_hints.py
system_prompt.py feat(prompt): configurable per-platform system-prompt hint overrides 2026-06-18 14:28:01 -07:00
think_scrubber.py
title_generator.py feat(titles): support language-aware title generation (#45296) 2026-06-19 17:15:52 -07:00
tool_dispatch_helpers.py
tool_executor.py feat(memory): batch operations for single-turn memory updates (#48507) 2026-06-18 10:19:33 -07:00
tool_guardrails.py
tool_result_classification.py
trajectory.py
transcription_provider.py
transcription_registry.py
tts_provider.py
tts_registry.py
turn_context.py fix(mcp): address adversarial review round 1 (cache parity, gates, races) 2026-06-19 11:57:43 -07:00
turn_finalizer.py refactor(agent): extract run_conversation post-loop tail into finalize_turn (god-file Phase 1) 2026-06-08 09:42:23 -07:00
turn_retry_state.py fix(agent): fail over to fallback provider on persistent auth failure (401/403) 2026-06-20 11:38:01 -07:00
usage_pricing.py fix(model): require confirmation for expensive model selections 2026-06-10 00:24:06 -07:00
video_gen_provider.py
video_gen_registry.py
web_search_provider.py
web_search_registry.py