Skip to main content
Every interaction with Cline happens inside a task. Tasks are self-contained work sessions that capture your full conversation, code changes, command executions, and decisions.

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
The quality of your initial prompt directly affects how well Cline performs. Learn how to write effective prompts in the Prompt Module.

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:
ScenarioActionWhy
Switching to a different featureNew taskClean context, focused responses
Building on work Cline just completedContinueShared understanding preserved
Cline keeps going off-trackNew taskFighting bad context wastes time
Iterating on the same filesContinueConversation history helps
You keep explaining what to ignoreNew taskCluttered context hurts quality
Refining Cline’s last outputContinueMomentum 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
When the context window approaches its limit, Cline automatically compresses older parts of the conversation to make room. Very long tasks may lose some earlier details, though Cline prioritizes preserving the most important context. This is why task scoping matters: a focused task keeps relevant information in the window. A sprawling task fills it with noise, pushing out useful context.
If your starting context seems high even for simple prompts, add a .clineignore file to exclude dependencies, build artifacts, and other files Cline doesn’t need. This can significantly reduce your baseline token usage.

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 typeBilling model
Cline providerPay-per-use with purchased credits
Direct API keysBilled by your provider (Anthropic, OpenAI, etc.)
OpenRouter / RequestyAggregated billing across multiple models
Local modelsFree — 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
Star tasks that represent successful patterns, good prompts, or complex work you might want to reference later. Favorited tasks are protected from automatic deletion.

Resuming tasks

Cline can resume interrupted tasks with full context, even across editor sessions.
1

Open the task from history

Click the History button and select the task you want to resume.
2

Cline loads the conversation

The complete conversation history is restored. File states are checked against checkpoints to understand what changed.
3

Continue working

The task picks up where it left off. Add additional context if needed to reorient Cline before continuing.

Build docs developers (and LLMs) love