Skip to main content
Core Concepts

Choose the Right Working Mode

Overview

The same task can be accomplished in different ways. Qoder CLI offers various working modes, covering scenarios from instant conversations to long-running automation. Choosing the right mode helps you strike the perfect balance between controlling every step and letting Qoder work autonomously. This document helps you quickly choose the right approach based on task characteristics. Each mode has its own detailed documentation, which you can click to explore.

Quick Guide

  • Want to chat and work simultaneously, intervening at any time → interactive mode
  • Want to review the plan and confirm before making changes → Plan
  • Have a clear goal and want Qoder to work until it's done → Goal
  • Need to run at a specific time or repeat on a calendar schedule → Scheduled Task
  • Need to repeatedly run the same task at fixed time intervals → /loop
  • Need multiple agents to collaborate and orchestrate complex processes → Workflow
  • Need to run automatically in scripts or CI/CD pipelines → Headless

Work as You Chat: Interactive Mode

Interactive mode is the most commonly used default approach. Run qodercli in the project root directory to enter an interactive (TUI) session. You can converse in natural language, monitor Qoder's actions in real time, confirm permissions, and adjust the direction as needed. It is ideal for tasks requiring close human-AI collaboration, such as exploring code, implementing features step-by-step, and debugging issues. For more details, see Using the CLI.

Plan Before Execution: Plan

Use Plan when tasks are complex, have a broad impact, or when you want to review the approach before taking action. After entering Plan mode, Qoder explores the code in read-only mode and outputs a plan without directly modifying the code. Once you confirm the plan, exit Plan mode to begin execution. Use the /plan command to enter or exit. For more details, see Plan Before Execution (Plan).

Continuously Achieve a Goal: Goal

Use Goal when you have a clear completion condition and want Qoder to work autonomously until it is achieved. Enter via /goal set <目标>, and Qoder will automatically switch to an automated execution state, minimizing interruptions along the way. It is suitable for tasks with a clear endpoint, such as "fixing all failing tests" or "completing a refactoring until the build passes." For more details, see Continuously Achieve a Goal (Goal).

Execute at a Specified Time: Scheduled Task

Use Scheduled Tasks when a task needs to run once at a future point in time or repeat according to a calendar schedule. This is ideal for scheduled inspections, periodic reports, and automation triggered by a schedule. For more details, see Scheduled Execution Task.

Repeat at Fixed Intervals: /loop

Use /loop when you need to repeatedly run the same task at fixed time intervals. This is suitable for polling status, continuous checking, and periodic repetitive actions. For more details, see Repeat Tasks (/loop).

Multi-Agent Collaboration: Workflow

When a task is complex enough to require division of labor and collaboration among multiple agents, you can orchestrate a workflow to break the task down and assign it to different subagents. This is ideal for decomposing and advancing large tasks in parallel. For creating and orchestrating subagents, see Subagent. For multi-agent orchestration, see Dynamic workflows. For parallel collaboration, see Parallel Processing of Multiple Tasks.

Run in Scripts: Headless

Use Headless (non-interactive) mode when you need to embed Qoder CLI into scripts, automation processes, or CI/CD pipelines. Run it via qodercli --print to output structured results in Text, JSON, or Stream JSON format. Since there is no one present to confirm actions, permissions must be pre-configured in Headless mode. For more details, see Running Qoder CLI in Scripts.

Combining Approaches

These working modes are not mutually exclusive and can be combined. For example:
  • First use Plan to confirm the approach, then enter Goal to let Qoder execute autonomously until completion.
  • Pair Headless mode with permission modes to achieve unattended yet controlled automation.
  • Use Scheduled Task or /loop to trigger a fixed automation process.
Start with the approach that best fits your needs, and gradually combine them into workflows tailored for your team as you become more familiar with Qoder.