GENAI 102
M03 · L08
Working With Agents

Managing Long Sessions

A model can only hold so much in view at once — its context window is finite. Over a long working session it cannot remember everything, so the real skill is managing what stays in front of it.

01 / 08
GENAI 102
M03 · L08
Why It Drifts

The Window Fills Up

As a session grows, the conversation competes for a fixed amount of room. When it runs out, something has to give.

  • The context window fills up as messages, files, and tool output pile in.
  • Older details get pushed out of view to make room for new ones.
  • The agent starts to forget earlier decisions — or repeat work it already did.
02 / 08
GENAI 102
M03 · L08
Making Room

Context Compaction

Rather than carry every word forward, you can summarize the session so far into a compact form — keeping the decisions that matter and dropping the noise.

The idea
Replace a long history with a short summary of what was decided and where things stand — freeing room while preserving the thread.
03 / 08
GENAI 102
M03 · L08
Beyond One Window

Memory That Survives

A summary lives inside one window. To carry knowledge across sessions, write it down where the agent can re-read it.

  • Persistent notes and files outlast any single context window.
  • An instructions or decisions file can be re-read at the start of each session.
  • The agent picks up the thread by reading the file back, not by remembering.
04 / 08
GENAI 102
M03 · L08
Good Habits

Keep It Focused

Most session trouble is avoidable with a few habits: work in focused sessions, write decisions down, and start fresh for a new task rather than dragging a bloated history behind you.

Looking ahead
Module 5 goes deeper on the tradeoffs of the context window itself — how much to keep, and what it costs.
05 / 08
GENAI 102
Build It
Put It To Work

Build It

How to implement: keep a short “decisions so far” note for your project, and paste it in — or point the agent at it — whenever a session runs long. It is the memory the window keeps losing.

  • Weekly AI Tasks tracker — a decisions file (stack, schema, endpoints) keeps the agent consistent across many building sessions.
  • Personal brand site — a running outline plus a source list keeps generated sections coherent and grounded across sessions.
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

The context window is finite, so long sessions drift. Compaction summarizes to free room; persistent notes carry decisions across windows; and focused sessions plus a decisions file keep an agent consistent.

08 / 08