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
| Feature | Behavior |
|---|---|
| Max iterations | 1 |
| Tools enabled | Yes |
| Plan capability | No |
| Convergence check | Enabled |
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
| Feature | Behavior |
|---|---|
| Max iterations | 20 |
| Tools enabled | Yes |
| Plan capability | Yes |
| Convergence check | Enabled |
| Tool approval | Per policy requirements |
Plan Mode Workflow
Plan mode is not a fixed “understand → decompose → approve” sequence. It is an interactive drafting process:
- Goal description — You describe the goal to accomplish
- 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
- Plan generation — The model returns an executable plan list (Plan List)
- Plan approval — The plan is displayed in the session area, and the interaction area asks you to approve or reject
- Node execution — Approved plan nodes execute step by step
- Tool calls go through Shell Gate approval
- Each node updates its status after completion
- 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 withEnter - 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
ApprovalRequireddecisions pause execution
Use Cases
- Feature implementation
- Code refactoring
- Multi-file changes
- Complex debugging
Switching Modes
| Action | Effect |
|---|---|
Shift+Tab | Toggle between Plan and Bypass mode |
Inside the configuration center or initialization wizard,
Shift+Tabswitches configuration tabs or steps, not execution modes.
Modes and Tool Calls
Both modes support tool calls, but with different behaviors:
| Behavior | Bypass Mode | Plan Mode |
|---|---|---|
| Model requests tool | Execute one tool batch | Execute and continue model call |
| Tool result handling | Return tool result summary | Send tool result back to model for continued reasoning |
| Multi-turn iteration | Not supported | Supported (up to 20 iterations) |
| Risky operation approval | Execute directly | Pause 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