< Previous Challenge - Home - Next Challenge >
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.
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.
Using the NYC App you worked with in Challenge 02 (in Resources/Challenge-02-NYCApp), implement these four features in order:
GET /restaurants so callers can filter by borough and/or cuisine (e.g., /restaurants?borough=Brooklyn&cuisine=Mexican). Return the full list when no filters are provided.GET /neighborhoods/:name that returns the matching neighborhood object plus an embedded array of restaurants in that neighborhood (a cross-file join between neighborhoods.ts and restaurants.ts data).?page=N&limit=N support to all three list endpoints (/events/free-this-week, /restaurants, /neighborhoods). Default to page 1, limit 10. Return { page, limit, total, data }.400 Bad Request responses for invalid query parameters and 404 Not Found for missing resources across all routes.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.
Implement all four features in a single session without ever using /compact:
Record a brief evidence note after each feature: what worked, what degraded.
Implement the same four features, but actively manage context throughout. You choose your own strategy:
/compact to summarize and continue in the same session/clear to wipe and restart with a fresh prompt/new) at any breakpoint you chooseThe 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.
To complete this challenge successfully, you should be able to:
/compact, /clear, and starting a new session/compact, /clear, and /new all have trade-offs/compact preserves some context continuity but costs tokens to summarize/clear and /new give you a cold start — cheap per-turn but you re-establish context from scratch