What is a task?
A task begins when you submit a prompt. Your prompt defines the goal, and Cline works toward it through conversation, code changes, and tool use. Each task:- Starts with your prompt and builds context through the conversation
- Has a unique identifier and a dedicated storage directory on your machine
- Contains the full conversation history
- Tracks token usage, API costs, and execution time
- Can be interrupted and resumed across editor sessions
- Creates checkpoints for file changes at each step
Scoping your tasks
Each task carries its own context: the conversation history, decisions made, and understanding built up over the session. How you scope tasks directly affects result quality. A useful mental model: one task = one goal. “Implement user authentication” is one task. “Fix an unrelated CSS bug” is a separate task, even if you notice it while working on auth. A focused task produces better results. When a task covers too many unrelated goals, the context becomes cluttered and responses become less precise.If you’re unsure whether to continue or start fresh, err on the side of starting fresh. You can always find previous sessions in your task history.
Starting and continuing tasks
To start a new task, click the + button in the Cline sidebar or use the/newtask slash command.
Knowing when to start fresh versus continue gets intuitive with practice. Use this table as a starting point:
| Scenario | Action | Why |
|---|---|---|
| Switching to a different feature | New task | Clean context, focused responses |
| Building on work Cline just completed | Continue | Shared understanding preserved |
| Cline keeps going off-track | New task | Fighting bad context wastes time |
| Iterating on the same files | Continue | Conversation history helps |
| You keep explaining what to ignore | New task | Cluttered context hurts quality |
| Refining Cline’s last output | Continue | Momentum and prior decisions preserved |
Understanding the context window
Every AI model has a context window — a limit on how much information it can hold at once. Think of it as Cline’s working memory for the current task. As you work, the context window fills with:- Your prompts and Cline’s responses
- File contents Cline reads or edits
- Command outputs and tool results
- System instructions and Cline Rules
Auto-compact
For long-running tasks, the auto-compact feature intelligently manages context as you work. When the context window nears its limit, Cline compresses the conversation history into a structured summary — preserving key decisions, file changes, and next steps — then continues working in the same task. This is different from starting a new task with/newtask. Auto-compact keeps you in the same task thread while reclaiming context window space. Enable it in Settings → Cline → Auto-Compact.
Understanding task costs
Every cloud-based AI model charges for usage based on tokens — the units of text the model processes. Cline tracks costs automatically and displays them in the task header. Input tokens cover your prompts, file contents, conversation history, and system instructions. Output tokens cover Cline’s responses, code suggestions, and tool calls. Output tokens typically cost more than input tokens. Some providers support prompt caching, which reduces costs when the same context — like your Cline rules or a large file — appears across multiple requests. Cline tracks cache savings automatically when your provider supports it.| Provider type | Billing model |
|---|---|
| Cline provider | Pay-per-use with purchased credits |
| Direct API keys | Billed by your provider (Anthropic, OpenAI, etc.) |
| OpenRouter / Requesty | Aggregated billing across multiple models |
| Local models | Free — you provide the hardware |
Free options
Free models
Search “free” in the model selector when using the Cline provider. These models display a FREE tag and work well for learning and experimentation.
Provider free tiers
Some providers offer limited free usage when you use your own API key. Check your provider’s pricing page for details.
Local models
Run models on your own hardware with no per-request costs. See Running models locally to get started.
Task history
Every task is saved automatically to your local machine. You can revisit past conversations, resume interrupted work, or reference successful approaches from earlier sessions.Finding your history
Click the History button (clock icon, top-right of the Cline sidebar) to open the history view. You’ll see all past tasks with their initial prompt, timestamp, and token usage.Searching tasks
Use the search bar at the top of the history view to find specific tasks. The fuzzy search looks across your prompts, Cline’s responses, code snippets, and file names. Sort results by:- Newest / Oldest for chronological browsing
- Most Expensive / Most Tokens to find resource-heavy tasks
- Most Relevant when searching for specific content
- Favorites to show only starred tasks
Resuming tasks
Cline can resume interrupted tasks with full context, even across editor sessions.Cline loads the conversation
The complete conversation history is restored. File states are checked against checkpoints to understand what changed.