正在加载视频...

视频加载失败

Problem: AI coding performance dips when context windows exceed 50% Solution: Combine Cline's context window awareness with the `new_task` tool + .clinerules to create a workflow that autonomously hands off tasks before hitting limits, ensuring persistent memory. A guide: 🧵

62,196 次观看 • 1 年前 •via X (Twitter)

11 条评论

Cline 的头像
Cline1 年前

Large context windows aren't a silver bullet. Models can still struggle or "forget" past ~50% usage, degrading performance. Plus, manually re-explaining project context each time you restart is a major workflow killer.

Cline 的头像
Cline1 年前

The first piece is awareness: Cline is aware of its own context window usage (visible in `environment_details`). It knows how much "memory" is being used relative to the model's limit (e.g., 105k/200k tokens = 53%).

Cline 的头像
Cline1 年前

The second piece is the `new_task` tool. This allows Cline to cleanly end the current session and immediately start a fresh one, crucially preloading it with specific context you define (summaries, next steps, file states, etc.).

Cline 的头像
Cline1 年前

The magic happens when you combine these in `.clinerules`. You define the trigger (e.g., "if context 50%, propose handoff") and exactly what context Cline should package using `new_task`. This creates an automated, proactive context management workflow.

Cline 的头像
Cline1 年前

The outcome? Cline intelligently manages its own context before performance degrades. No more manual resets or tedious re-explaining. For complex, multi-session tasks, it feels like working with an agent that has persistent memory.

Cline 的头像
Cline1 年前

Ready to build workflows that beat context limits? Learn how to implement this with `.clinerules` and the `new_task` tool in our docs:

NICE 的头像
NICE1 年前

Stay competitive by balancing cutting-edge AI with automation tools. Forrester shows how.

Cline 的头像
Cline1 年前

Try Cline today 👇

Jonathan Chang 的头像
Jonathan Chang1 年前

this is very cool. To solve this same issue, I created time travel tool to allow agent to partially clear the conversation and summarize it. I think it allow a more flexible way to manage context and make continuation more seamless.

Dexter 的头像
Dexter1 年前

Just curious: how are you measuring context windows? Simply token count input from the user?

Dan 的头像
Dan1 年前

cline just keeps consistently delivering. no wonder it's my go-to.

相关视频

New short course: LLMs as Operating Systems: Agent Memory, created with Letta, and taught by its founders Charles Packer and Sarah Wooders. An LLM's input context window has limited space. Using a longer input context also costs more and results in slower processing. So, managing what's stored in this context window is important. In the innovative paper MemGPT: Towards LLMs as Operating Systems, its authors (which include the instructors) proposed using an LLM agent to manage this context window. Their system uses a large persistent memory that stores everything that could be included in the input context, and an agent decides what is actually included. Take the example of building a chatbot that needs to remember what's been said earlier in a conversation (perhaps over many days of interaction with a user). As the conversation's length grows, the memory management agent will move information from the input context to a persistent searchable database; summarize information to keep relevant facts in the input context; and restore relevant conversation elements from further back in time. This allows a chatbot to keep what's currently most relevant in its input context memory to generate the next response. When I read the original MemGPT paper, I thought it was an innovative technique for handling memory for LLMs. The open-source Letta framework, which we'll use in this course, makes MemGPT easy to implement. It adds memory to your LLM agents and gives them transparent long-term memory. In detail, you’ll learn: - How to build an agent that can edit its own limited input context memory, using tools and multi-step reasoning - What is a memory hierarchy (an idea from computer operating systems, which use a cache to speed up memory access), and how these ideas apply to managing the LLM input context (where the input context window is a "cache" storing the most relevant information; and an agent decides what to move in and out of this to/from a larger persistent storage system) - How to implement multi-agent collaboration by letting different agents share blocks of memory This course will give you a sophisticated understanding of memory management for LLMs, which is important for chatbots having long conversations, and for complex agentic workflows. Please sign up here!

Andrew Ng

200,673 次观看 • 1 年前