๐ SoloEngine v0.4.0 Release โ Context Compaction, Browser/Terminal Panels, Token Statistics Refactor, Bundled Resources Cleanup, Agent Isolation and Code Optimization
[v0.4.0] - 2026-08-18
๐ Added
-
Context Compaction Mechanism โ
ReActCoreintroduces a context compaction mechanism. When the context window threshold is crossed, history that exceeds the model's context limit is automatically compressed into a structured summary, preventing long sessions from overflowing the window. Compressed messages are marked and skipped when loading the LLM context. When the user recalls a message located after compressed messages, those compressed messages are restored. The WebSocket protocol adds a newcontext_compressedevent. -
LLM Configuration Enhancements โ
LLMConfigModeladds a full-URL switch (skipping SDK path auto-completion), separate input/output token limits, and a per-loop tool-call rounds cap. The frontendModelManagerform exposes the corresponding fields. A new lookup table mapsprovider + model_nameto context-window limits, covering mainstream OpenAI, Anthropic, and Qwen models. -
SettingsModal Compaction Tab โ
SettingsModaladds a new "Context Compaction" tab exposing the switch and threshold settings.canvasStoredefaults and Canvas nodes consume these settings. -
Model Context Default โ A new frontend default
LLM_DEFAULT_MAX_INPUT_TOKENSis introduced and used to populate new flow nodes on creation. -
Command Tools Wired to PTY Execution โ The command tool suite (
run_command,stop_command,get_diagnostics, etc.) gains new capabilities and is wired to real PTY execution, so command output now flows into the actual terminal. -
LLM Stream Stall Timeout Protection โ All LLM model adapters (OpenAI, Anthropic, Ollama) configure a stream stall timeout at the client layer and replace raw
async forwith a protected stream iterator. Without this, an LLM that sends response headers but stops emitting chunks would block indefinitely, leaving pause/stop ineffective. - HITL Shared Mechanism โ A unified "tool pauses and waits for the user" implementation is added. Deletion, file write, command execution, plan-mode exit, and asking the user a question share a single approve-wait-resume pipeline.
-
EnterPlanMode Tool โ The LLM can request entry into a read-only Plan mode. Both entry and exit require user approval.
PlanNotebookPluginis initialized in Plan mode for organizing the implementation plan. -
Browser Panel โ
RunPaneladds a browser panel with embedded iframe site preview. A new same-origin proxy endpoint resolves address-bar sync and back/forward navigation issues for cross-origin iframes. The frontend flow API is updated to handle the backend's wrapped response format. -
Terminal Panel โ
RunPaneladds a terminal panel that creates multiple real PTY sessions (on Windows, via ConPTY). New REST session management and a bidirectional WebSocket channel (input / resize / output / exit) are exposed, with a per-session serial-execution lock preventing output interleaving from multiple agents.
๐ง Improved
-
Token Statistics Refactor โ The three legacy token columns (input / output / total) on
session_messagesare merged into a single JSON field, persisting token history per message.TokenMonitorcan now recover its context-usage state across refresh and session switches. Compaction summaries render as a dedicated message type in their own bubble. -
Execution-Key Agent Instance Isolation โ
CompiledFlowintroduces a SoloAgent instance registry keyed byexecution_key. Concurrent executions sharing the sameagent_idno longer share a single instance, fundamentally eliminating state pollution. -
get_session_messagesFlattening Refactor โ The legacy multi-layer SubAgent block-building chain (six functions) is removed.get_session_messagesinlines the flattening logic, usingtool_call_idto correlate SubAgent messages accurately. Compaction blocks are saved as ordinary LLM output and preserved alongside the summary. -
ReActCore Token Usage Source-of-Truth โ Token usage is now persisted exclusively per message. Session-level
token_usageis aggregated from the message table.database_memory.pyandrun.pyshare a single update entry. -
RunPanel Layout and Interaction โ Large-scale rendering upgrades for
MessageListandRunPanel. Streaming, queue, and context-window handling logic is consolidated.EditorPageand the property editor gain new capabilities. -
Canvas and Export Polish โ
Canvas,AgentNode,ExportModal, andPreviewreceive styling and behavior updates.
๐ Fixed
- SubAgent Pre-Compaction Output Loss โ Previously, SubAgent output emitted before compaction was discarded. It is now preserved as an independent message alongside the compaction summary, restoring full audit history.
- Compaction Round Output Truncated โ Compaction rounds sometimes ended without producing output. Compaction rounds now reliably complete and emit a structured summary.
- Compaction Thought Leakage โ Previously, compaction rounds could interleave reasoning blocks into the same bubble. Reasoning blocks during compaction are now isolated into a dedicated compaction bubble.
- Compaction Threshold Mis-Trigger โ Compaction was originally triggered based on cumulative request token volume rather than per-request context-window occupancy. It is now keyed on per-request context occupancy.
-
False Completion on Empty Collector โ Previously, a silent LLM failure (empty
collector) was incorrectly reported ascompleted. The empty-collector check now forces a failed status with the real LLM error output. - Compressed State Loss on Message Recall โ When recalling a message located after compressed messages, the file-change interface now restores those compressed messages, allowing continued editing.
- Flow API Response Unwrap โ The frontend received empty objects when the backend returned a wrapped envelope. The unwrap path is now correct.
- Anthropic Model Stream Cleanup โ The Anthropic adapter no longer leaves dangling clients after stream closure.
๐๏ธ Removed
-
backend/SoloAgent/solo_agent/loader.pyโ Agent loading logic has been merged intoflow_compiler.pyandreact_core.py. -
backend/app/api/v1/websocket.pyโ Replaced by the layeredwebsocket_handler.py. -
frontend/src/components/Monitor/Monitor.tsxandFunctionCallVisualization.tsxโ Old monitoring views replaced byTokenMonitorandBrowserPanel. -
frontend/src/components/RunPanel/hooks/useCallRecords.tsโ Call record handling merged intouseStreamingData.ts. -
frontend/src/pages/MainMenu/ProjectList.tsxโ Project list migrated to the canvas workspace. -
frontend/src/services/localStorage.tsโ Replaced by Zustand store persistence. -
frontend/src/services/websocket.tsโ Replaced byuseRunWebSocket.ts. -
data/system/skills/(entire subtree) โ Bundled Skill resources removed; users add their own. -
data/system/mcp_servers/(entire subtree) โ Bundled MCP Server resources removed; users register their own. -
sync_system_skills(db)(fromskills.py) โ Auto-indexing helper removed alongside the bundled skills. - Token columns (input / output / total) on
session_messagesโ Replaced by a single JSON field.
๐ค Join Us
We're looking for like-minded contributors who share our passion for SoloEngine and Agentic AI. Every contribution โ from a typo fix to a full feature โ makes SoloEngine better.
๐ Contributing Guide ยท ๐ฌ Discussions ยท ๐ง Contact Us
Top comments (1)
Cool, been waiting on this update forever