DEV Community

Sh4rlock
Sh4rlock

Posted on

๐Ÿš€ SoloEngine v0.4.0 Release

๐Ÿš€ 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 โ€” ReActCore introduces 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 new context_compressed event.
  • LLM Configuration Enhancements โ€” LLMConfigModel adds a full-URL switch (skipping SDK path auto-completion), separate input/output token limits, and a per-loop tool-call rounds cap. The frontend ModelManager form exposes the corresponding fields. A new lookup table maps provider + model_name to context-window limits, covering mainstream OpenAI, Anthropic, and Qwen models.
  • SettingsModal Compaction Tab โ€” SettingsModal adds a new "Context Compaction" tab exposing the switch and threshold settings. canvasStore defaults and Canvas nodes consume these settings.
  • Model Context Default โ€” A new frontend default LLM_DEFAULT_MAX_INPUT_TOKENS is 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 for with 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. PlanNotebookPlugin is initialized in Plan mode for organizing the implementation plan.
  • Browser Panel โ€” RunPanel adds 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 โ€” RunPanel adds 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_messages are merged into a single JSON field, persisting token history per message. TokenMonitor can 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 โ€” CompiledFlow introduces a SoloAgent instance registry keyed by execution_key. Concurrent executions sharing the same agent_id no longer share a single instance, fundamentally eliminating state pollution.
  • get_session_messages Flattening Refactor โ€” The legacy multi-layer SubAgent block-building chain (six functions) is removed. get_session_messages inlines the flattening logic, using tool_call_id to 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_usage is aggregated from the message table. database_memory.py and run.py share a single update entry.
  • RunPanel Layout and Interaction โ€” Large-scale rendering upgrades for MessageList and RunPanel. Streaming, queue, and context-window handling logic is consolidated. EditorPage and the property editor gain new capabilities.
  • Canvas and Export Polish โ€” Canvas, AgentNode, ExportModal, and Preview receive 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 as completed. 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 into flow_compiler.py and react_core.py.
  • backend/app/api/v1/websocket.py โ€” Replaced by the layered websocket_handler.py.
  • frontend/src/components/Monitor/Monitor.tsx and FunctionCallVisualization.tsx โ€” Old monitoring views replaced by TokenMonitor and BrowserPanel.
  • frontend/src/components/RunPanel/hooks/useCallRecords.ts โ€” Call record handling merged into useStreamingData.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 by useRunWebSocket.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) (from skills.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)

Collapse
 
cx330aurora profile image
Cx330

Cool, been waiting on this update forever