Two Modes, One Engine

Alius uses a unified Loop Engine with two execution strategies:

  • Plan mode = Loop Engine + PlanPolicy (multi-turn iteration, tool approval)
  • Bypass mode = Loop Engine + ChatPolicy (single-turn execution, quick response)

Both modes share the same underlying runtime, protocol interfaces, and memory system. Switch at any time with Shift+Tab.

Bypass Mode

Quick single-turn interactions for lightweight tasks:

> Explain this function
> What does the auth middleware do?
> List files in this directory

Bypass Mode Behavior

FeatureBehavior
Max iterations1
Tools enabledYes
Plan capabilityNo
Convergence checkEnabled

Bypass mode executes a single-turn request. If the model requests a tool call, the runtime executes one tool batch and returns a tool result summary, but does not continue into a multi-turn model/tool iteration loop.

Safety in Bypass Mode

In Bypass mode, Shell Gate decisions requiring approval (ApprovalRequired) are executed directly rather than showing a confirmation prompt. For example, shell tool calls requested by the model (like git clone) run directly and return results. Operations denied by Shell Gate still do not execute.

Use Cases

  • Q&A and explanations
  • Quick queries and clarifications
  • Lightweight code generation
  • One-shot analysis

Plan Mode

Multi-step planning and execution for complex tasks:

> Refactor the auth module to support OAuth2
> Add a caching layer to the user service
> Fix all compile errors and ensure tests pass

Plan Mode Behavior

FeatureBehavior
Max iterations20
Tools enabledYes
Plan capabilityYes
Convergence checkEnabled
Tool approvalPer policy requirements

Plan Mode Workflow

Plan mode is not a fixed “understand → decompose → approve” sequence. It is an interactive drafting process:

  1. Goal description — You describe the goal to accomplish
  2. Clarification phase — The model proactively asks about unclear requirement details
    • Questions appear in the session area (e.g., “What is this interface used for?”)
    • The interaction area shows model-suggested answers as options (single-select, multi-select, or free input)
    • The model continues asking until task details, preconditions, constraints, and success criteria are clear enough
  3. Plan generation — The model returns an executable plan list (Plan List)
  4. Plan approval — The plan is displayed in the session area, and the interaction area asks you to approve or reject
  5. Node execution — Approved plan nodes execute step by step
    • Tool calls go through Shell Gate approval
    • Each node updates its status after completion
  6. Completion confirmation — After all nodes finish executing, you confirm the plan is complete, and the plan panel closes

During plan drafting, the plan panel is hidden. Only after you approve the plan does the plan panel appear and show the approved nodes.

Clarification Prompts

The model in Plan mode minimizes your typing:

  • Single-select — Options displayed in the interaction area, navigate with arrow keys
  • Multi-select — Options displayed, toggle with Space, confirm with Enter
  • Free input — Used only when the model cannot simplify the question into options

Safety in Plan Mode

In Plan mode:

  • Tool operations requiring approval (e.g., write_file, risky shell commands) pause and wait for your confirmation
  • All file write operations require confirmation
  • Shell Gate ApprovalRequired decisions pause execution

Use Cases

  • Feature implementation
  • Code refactoring
  • Multi-file changes
  • Complex debugging

Switching Modes

ActionEffect
Shift+TabToggle between Plan and Bypass mode

Inside the configuration center or initialization wizard, Shift+Tab switches configuration tabs or steps, not execution modes.

Modes and Tool Calls

Both modes support tool calls, but with different behaviors:

BehaviorBypass ModePlan Mode
Model requests toolExecute one tool batchExecute and continue model call
Tool result handlingReturn tool result summarySend tool result back to model for continued reasoning
Multi-turn iterationNot supportedSupported (up to 20 iterations)
Risky operation approvalExecute directlyPause and wait for confirmation

Runtime Architecture

Both modes execute through the same runtime chain:

User Input
  → CoreRuntimeManager
  → ProtocolInterface<CoreRuntime>
  → CoreRuntime
  → SessionManager
  → LoopEngine (executes Chat or Plan mode per policy)
  → LlmClient + optional ToolRegistry