new_task
Tool & Context Management Strategiesnew_task
, designed to help manage workflow continuity and context preservation, especially during complex or long-running tasks. This tool, combined with Cline’s awareness of its own context window usage and the flexibility of .clinerules
, enables sophisticated strategies for breaking down work and ensuring seamless transitions between task sessions.
Understanding the core capabilities and how they interact with custom rules is key to leveraging this feature effectively.
new_task
Tool:
<context>
block. This context can be anything Cline or a .clinerules
file defines – summaries, code snippets, next steps, project state, etc.environment_details
provided to Cline in its prompt./newtask
Slash Commandnewtask
tool or defining complex rules, you can directly initiate the process using a Slash Command.
/newtask
in the chat input field.ask_followup_question
prompt to confirm and potentially modify the context before the new task is created.new_task
functionality for branching explorations or managing long sessions without waiting for Cline to suggest it./newtask
slash command, see the New Task Command
documentation..clinerules
).clinerules
dictating its behavior:
new_task
tool exists, and Cline can choose to use it.new_task
comes from the AI model’s reasoning based on the overall task progress and prompt instructions.new_task
is used without specific rules defining the <context>
block structure, Cline will attempt to preload relevant information based on its current understanding (e.g., a basic summary of progress and next steps), but this may be less comprehensive than a rule-driven approach..clinerules
: Enabling Custom Workflowsnew_task
and context awareness with custom workflows defined in .clinerules
. This allows you to precisely control when and how Cline manages context and task continuity.
Key benefits of using .clinerules
with new_task
:
.clinerules
to have Cline automatically create a new task via new_task
upon completing each subtask, preloading the context for the next subtask.<context>
block in .clinerules
for highly detailed and consistent handoffs (see example below).new_task
context blocks as a primary, integrated way to persist information across sessions, potentially replacing or supplementing file-based memory systems..clinerules
like the example below, involves these steps:
ask_followup_question
to propose creating a new task, often showing the intended context defined by the rules.
new_task
Tool): If approved, Cline uses new_task
, packaging the context according to the structure mandated by the .clinerules
.
.clinerules
define the <context>
block. A comprehensive structure often includes:
## Completed Work
: Detailed list of accomplishments, files modified/created, key decisions.## Current State
: Project status, running processes, key file states.## Next Steps
: Clear, prioritized list of remaining tasks, implementation details, known challenges.## Reference Information
: Links, code snippets, patterns, user preferences.new_task
combined with .clinerules
opens up many possibilities:
.clinerules
to have Cline automatically create a new task via new_task
upon completing each subtask.<context>
block to always include a summary of the previous session’s key discussion points.new_task
context blocks as the primary way to persist information across sessions, potentially replacing file-based memory systems..clinerules
is encouraged to discover workflows that best suit your needs!
.clinerules
: Task Handoff Strategy Guide.clinerules
file focused specifically on using new_task
for context window management. Remember, this is just one specific strategy; the core new_task
tool can be used differently with other custom rules.