The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
Merge remote-tracking branch 'origin/main' into sid/onboarding
alt-glitch2c8df45ee501
diff --cc agent/conversation_loop.pyindex c5e6859a811,8a6c22d6079..77426b92da1--- a/agent/conversation_loop.py+++ b/agent/conversation_loop.py@@@ -1732,33 -1715,32 +1731,37 @@@ def run_conversationaddresses, after every history rewrite including post-turn micro-compaction."""from agent.turn_context import export_current_turn_boundary+ from agent.voice_turn_route import end_voice_turn_routefrom tools.vision_tools_history_budget import native_turn_images+ # Steer / redirect / interrupt set this mid-turn; the result reports whether the turn ran untouched.+ agent._turn_user_intervened = False# Images attached natively to this user turn stay visible to vision_analyze for the turn, so# it does not embed the same pixels a second time into the same request (#76411).with native_turn_images(user_message):- result = _run_conversation_turn(- agent,- user_message,- system_message=system_message,- conversation_history=conversation_history,- task_id=task_id,- stream_callback=stream_callback,- persist_user_message=persist_user_message,- persist_user_timestamp=persist_user_timestamp,- persist_user_display_kind=persist_user_display_kind,- persist_user_display_metadata=persist_user_display_metadata,- persist_user_platform_id=persist_user_platform_id,- moa_config=moa_config,- turn_author=turn_author,- title_user_message=title_user_message,- prelude=prelude,- )+ try:+ result = _run_conversation_turn(+ agent,+ user_message,+ system_message=system_message,+ conversation_history=conversation_history,+ task_id=task_id,+ stream_callback=stream_callback,+ persist_user_message=persist_user_message,+ persist_user_timestamp=persist_user_timestamp,+ persist_user_display_kind=persist_user_display_kind,+ persist_user_display_metadata=persist_user_display_metadata,+ persist_user_platform_id=persist_user_platform_id,+ moa_config=moa_config,+ turn_author=turn_author,+ title_user_message=title_user_message,++ prelude=prelude,+ )+ finally:+ end_voice_turn_route(agent)result = export_current_turn_boundary(agent, result, user_message)+ if isinstance(result, dict):+ result["user_intervened"] = bool(getattr(agent, "_turn_user_intervened", False))_close_durable_failed_turn(agent, result)return resultdiff --cc agent/message_sanitization.pyindex e41a227448d,a851e641342..d8d36dd8096--- a/agent/message_sanitization.py+++ b/agent/message_sanitization.py@@@ -12,8 -12,9 +12,9 @@@ import jsoimport loggingimport refrom functools import partial-from typing import Any, Callable+from typing import Any, Callable, Iterable+ from agent.agent_runtime_helpers_placeholders import _INTERRUPTED_PLACEHOLDER, hidden_interrupt_placeholder_rowfrom agent.message_metadata import DB_ROW_SNAPSHOTfrom agent.vision_message_prep import _provider_model_keydiff --cc apps/desktop/src/app/session/hooks/use-session-actions/index.tsindex 716a3237e71,40bff29e2d0..ea65c313586--- a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts+++ b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts@@@ -160,10 -158,14 +159,15 @@@ import typeimport { navigateToWorkspacePage, NEW_CHAT_ROUTE, sessionRoute, SETTINGS_ROUTE } from '../../../routes'import type { ClientSessionState, SidebarNavItem } from '../../../types'- import { pinStoredSessionForOwner, releaseStoredSessionPins, sessionContextDrift } from '../session-context-drift'+ import {+ pinStoredSessionForOwner,+ releaseStoredSessionPins,+ resumeRouteStillCurrent,+ sessionContextDrift+ } from '../session-context-drift'import { singleFlightSessionResume } from '../use-prompt-actions/single-flight-resume'+import { branchCreateKey } from './branch-create-key'import { sessionCreateOverrideParams, type SessionCreateOverrides, type SessionSeedMessage } from './create-overrides'import { markSessionCreatedThisRun, sessionCreatedThisRun } from './created-this-run'import { captureDisplayHydration } from './display-hydration'diff --cc tui_gateway/prompt_turn.pyindex 0c4bba765b1,fcffd89e5b7..0cc90dee8a2--- a/tui_gateway/prompt_turn.py+++ b/tui_gateway/prompt_turn.py@@@ -729,7 -728,7 +729,8 @@@ def _prepare_turn_input(sid: str, sessiif take_speech_interrupted():run_message = _prepend_note(run_message, SPEECH_INTERRUPTED_NOTE)run_message = _prepend_note(run_message, _pending_reaction_notes(session))+ run_message = _prepend_note(run_message, _pending_tool_retry_notes(session))+ agent._voice_turn_pending = bool(session.pop("voice_turn", False)) # auxiliary.voice_chat routereturn prompt, _prepend_note(run_message, _hud_surface_note(session)), cols, streamer