Agentic AI Notebook
Context Engineering
Phase 6Module 12 of 15

Long-Running Context

Coding agents and research agents outlive a single HTTP request.

A bookmark and a sticky note, not rereading the novel every morning.

Visual Workflows

Start here — scroll inside each diagram frame to explore, then use + / to zoom up to 200% if needed.

Overview

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

This turn

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

A bookmark and a sticky note, not rereading the novel every morning.

Key Takeaways

  • 1.Jobs that last hours need checkpoints of context, not one giant prompt.
  • 2.Each resume loads compacted state plus the next slice of work.
  • 3.Durable runtimes store that state; you still design what is in it.
  • 4.Do not replay the entire history on every resume.
  • 5.Coding agents and research agents outlive a single HTTP request.

Learn elsewhere

  • Durable Execution — Phase 21

Real Example

Scenario

Long jobs: pack only what this turn needs.

What you would do

In Context Engineering, apply Long-Running Context to this scenario: Long jobs: pack only what this turn needs. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

Commands

Commands to Remember

  • Jobs that last hours need checkpoints of context, not one giant prompt
  • Each resume loads compacted state plus the next slice of work
  • Durable runtimes store that state; you still design what is in it
  • Do not replay the entire history on every resume

Cheat Sheet

Quick recap

quick ref
  • Long jobs
  • Budget
  • Don't dump

Common Mistakes

  • Skipping evaluation for Long-Running Context before production
  • No logging or tracing around long running context steps
  • Ignoring cost and latency implications