Challenge 05 - Context Window Management

< Previous Challenge - Home - Next Challenge >

Pre-requisites

Introduction

Context windows grow with every interaction. As a session accumulates messages, attachments, and generated code, the model has more history to process each turn.

When context grows too large, quality often drops: missed requirements, repeated questions, inconsistent edits, and higher credit spend. In this challenge, you will compare unmanaged context growth against proactive context management and measure the credit difference.

Description

You will extend the CityScout NYC App (from Challenge 02) with four new features, then compare two session strategies side-by-side: one where you let context grow unchecked, and one where you actively manage it. The features deliberately span all three routes and force topic switching—exactly the conditions that grow context fast.

The Task: CityScout Feature Sprint

Using the NYC App you worked with in Challenge 02 (in Resources/Challenge-02-NYCApp), implement these four features in order:

These four features touch multiple files, require cross-file references, and create natural breakpoints between each feature—ideal for testing context management strategies. We recommend not committing these files to make it easier to revert.

Run A – Unmanaged Context Growth

Implement all four features in a single session without ever using /compact:

Record a brief evidence note after each feature: what worked, what degraded.

Run B – Proactive Context Management

Implement the same four features, but actively manage context throughout. You choose your own strategy:

The goal is to keep context lean and credit spend low. Track total credits across the entire sprint (including any new sessions you start) and compare with Run A. Document which context management actions you took and why.

Success Criteria

To complete this challenge successfully, you should be able to:

Learning Resources

Tips