Skip to content

feat: self-heal continuation + auto-proceed session advancement#117

Open
aEgoist wants to merge 3 commits into
OpenBMB:mainfrom
aEgoist:main
Open

feat: self-heal continuation + auto-proceed session advancement#117
aEgoist wants to merge 3 commits into
OpenBMB:mainfrom
aEgoist:main

Conversation

@aEgoist
Copy link
Copy Markdown

@aEgoist aEgoist commented Jun 2, 2026

Patch 1: Self-heal continuation (go-on)

Problem

When a model API disconnects, returns empty content, or the AgentLoop exits a tool-call-only turn without producing a text reply, the session permanently stalls. The user must manually type "继续" (continue) to unblock.

Solution

  • Detection: After a complete event, check the last assistant text message. If its trimmed content is < 20 characters, we consider the turn stalled.
  • Action: Automatically send a "继续" command via startSessionCommand to resume the session.
  • 10-second cooldown: Prevents duplicate triggers from multiple rapid completes.
  • Opt-in setting: selfHealContinue (default false), toggled in Settings → Permissions.

Patch 2: Auto-proceed session advancement

Problem

Users need a way to keep sessions moving forward without manual re-prompting. After each assistant reply, the user must manually check whether the work is complete and type a follow-up instruction.

Solution

Auto-proceed — a per-session toggle that, when active, automatically sends a configurable follow-up prompt after each assistant reply, re-checking completeness and correctness. The session self-terminates when the assistant says "无需自动推进" (no auto-advance needed).

  • Per-session toggle: Click the small dot beside each session title in the sidebar to toggle auto-proceed on/off.
    • 🟢 Emerald dot = auto-proceed active
    • ⚪ Gray dot = auto-proceed off
    • 🔵 Blue dot = unread messages (overrides green temporarily)
    • Spinner = agent running
  • Global default: autoProceedOn setting (default true) controls whether new sessions start with auto-proceed enabled.
  • Customizable prompt: autoProceedPrompt setting — the follow-up prompt injected after each reply.
  • Self-termination: If the assistant replies with "无需自动推进", no further prompt is injected.

Files changed

self-heal (commit 1)

File Change
ui/src/components/chat/types/types.ts Add selfHealContinue?: boolean
ui/src/components/chat/utils/chatStorage.ts Default and merge for selfHealContinue
ui/src/components/chat/hooks/useChatRealtimeHandlers.ts Core stall-detection + self-heal logic
ui/src/components/chat-v2/ChatInterfaceV2.tsx Pass sendMessage prop
ui/src/components/settings/view/tabs/PermissionsSettingsTab.tsx Toggle UI
ui/src/i18n/locales/en/settings.json EN strings
ui/src/i18n/locales/zh-CN/settings.json ZH strings

auto-proceed (commit 2)

File Change
ui/src/components/chat/utils/autoProceedStorage.ts New: per-session localStorage persistence
ui/src/components/chat/types/types.ts Add autoProceedOn, autoProceedPrompt, AUTO_PROCEED_DEFAULT_PROMPT
ui/src/components/chat/utils/chatStorage.ts Default and merge for new fields
ui/src/components/app-shell/SidebarV2.tsx Enhanced SessionStatusIndicator: clickable dot, emerald/gray toggle
ui/src/components/chat/hooks/useChatRealtimeHandlers.ts Complete handler: inject auto-proceed prompt when active
ui/src/components/settings/view/tabs/PermissionsSettingsTab.tsx Toggle + textarea for autoProceed settings
ui/src/i18n/locales/en/settings.json EN strings
ui/src/i18n/locales/zh-CN/settings.json ZH strings

aEgoist added 2 commits June 2, 2026 23:27
- Add selfHealContinue setting that auto-sends '继续' when
  assistant produces no real text output (empty/too-short reply)
- Detect stall by checking last assistant text message < 20 chars
- 10s cooldown to prevent rapid re-fire
- Add toggle in Settings → Permissions page
- Add i18n strings (en + zh-CN)
- Also includes ongoing AgentLoop improvements

Closes #self-heal
- Per-session auto-proceed toggle via sidebar dot (green=on, gray=off)
- Global autoProceedOn setting (default true) controls new sessions
- Customizable autoProceedPrompt in Settings
- After each assistant reply, auto-injects prompt for re-check
  unless reply contains '无需自动推进'
- Sidebar dot: clickable 6x6px area, toggles between emerald/gray
- Settings UI: toggle + textarea for prompt

Closes #auto-proceed
@aEgoist aEgoist changed the title feat: self-heal continuation (go-on) — auto-detect stalled turns and resume feat: self-heal continuation + auto-proceed session advancement Jun 2, 2026
- Fix dot invisibility: use <span role='button'> instead of <button>
- Fix state leak: store '0' in localStorage instead of removing key
- Fix color: use bg-emerald-700 for deeper/darker green
- Add keyboard accessibility (Enter/Space) for the dot toggle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant