Skip to content
Agentic Levels
Start hereLevelsTracksPromptsAbout
Get my levelGet my level

  • Start hereYour first useful task with AI.
  • Level quiz8 questions. No AI needed.
  • Fluency ScoreYour Level and a score, from your own AI.

  • LevelsThe 11 levels, in order.
  • LessonsShort lessons, filter by level.
  • TracksGuided paths by tool, role or goal.
  • Set up your AI tool
  • Starter packFree files that help AI remember.

  • PromptsReady prompts to copy and adapt.
  • ChatGPT vs Claude vs GeminiPick the right one for the job.
  • How-tos
  • ReferenceCommands for Claude Code, Codex, Antigravity.
  • ResourcesHand-picked reading and tools.

  • Your progress
  • Your next moveAn interview that picks your next skill.
  • Your next lessonsThe next lessons at your level.
  • Updates

  • Pricing
  • About
  • FAQ & Feedback
  • Work with us
  • How we handle your data
Sign inPreferences
AboutPricingHow-tosPromptsStarter packMy stackHow we handle your data

© 2026 Fuentes Studio

PrivacyTermsRefundsAccessibilityAI content policyCredits
yourCouncil
Ready to help
✦

What do you want to understand?

Ask anything about what you're learning.

←Level 2
  1. Levels
  2. ›Level 2
  3. ›Pre-Load the Context
2

Part of the Level 2 core path · Lesson 3 of 7 · Free

Pre-Load the Context

After this, you'll know how to arrange open files before you start completing, so the model has the types and patterns it needs to produce usable suggestions.

Before you start

Before diving in, complete Read Before Tab so you can immediately evaluate whether your pre-loaded context improved the completion quality.

The idea

Inline completion models do not read your whole project. They see the current file and a limited window of related files, usually the ones currently open in your editor tabs. Your architecture, your type definitions in other directories, your utility functions in other modules: none of that exists to the model unless you put it in the window.

Worked example

Before and after

This has a concrete practical consequence. If you open a call site and start completing a function call without having the interface or type definition visible, the model will invent plausible-looking argument shapes. If you open the interface file first, then switch to the call site, the model has that type definition in its context window and will complete against your actual API, not an invented one.

The pre-load habit: before you complete at a call site, open the file that defines the type, interface, or function you are calling. Before you complete a database query, open the schema file. Before you complete a component's props, open the props type definition. One or two extra file opens, done before you start typing, change the quality of completions dramatically.

Try it (15 min)

Paste this into Claude

I want to test pre-loading. Pick a real call site in your project where you need to call a function or use a type defined in another file. Do the completion twice: (1) Close all related files and complete from scratch. Note what the model generates. (2) Open the file that defines the function signature or type, then switch back to your call site and complete again. Note what the model generates this time. Paste both completions here and tell me: what changed? What did the model get wrong in the first attempt that it got right in the second?

What a good response looks like

Here is the side-by-side comparison for completing a createUser call site in your API service:

Without pre-load (no files open except the call site): The model completed with createUser({ name: data.name, email: data.email, role: 'user' }). It invented role: 'user' as a default, which is not a field on your CreateUserDto. It also missed the required organizationId field entirely. The completion would have compiled but thrown a runtime validation error.

With user.dto.ts and user.service.ts open first: The model completed with createUser({ name: data.name, email: data.email, organizationId: data.organizationId, createdAt: new Date() }). It used your actual DTO fields, included organizationId, and correctly added createdAt which it saw in the service definition.

What changed: opening user.dto.ts gave the model your exact field names. Opening user.service.ts showed it the full method signature including required fields. Two extra tabs open, zero invented fields.

For your project: before completing any DTO call site, open the DTO file first. Before completing any service method call, open the service interface. This is the pre-load rule for your specific stack.

Check yours against

  • You ran both completions (without and with the pre-loaded file) and compared the outputs
  • The pre-loaded completion used your actual types or parameter names rather than invented ones
  • You can describe in one sentence what file to open before completing at a specific kind of call site in your project
  • You identified at least one case where the model invented a plausible but wrong argument in the no-context version
  • You now have a consistent pre-load habit for at least one common completion pattern in your project
  • Completing against an interface you have not opened and trusting the result. The model will invent plausible argument names that do not match your actual API.
  • Assuming the model knows your project because you have been in this codebase all day. Each completion is stateless. It sees only what is open.
  • Opening the wrong version of a file. If you have a local override or a generated file next to a source file, open the one the editor will actually use.
  • Pre-loading too many files at once. Two or three focused files beat ten loosely related ones. More open files means more noise in the context window.
  • Forgetting that context windows reset on editor restart. Re-open your key files at the start of each session.

When this breaks

  • Breaks when types are spread across many files with no obvious entry point, because pre-loading two or three related files cannot represent a deep dependency graph and the model still has to guess.
  • Breaks when you flood the window with too many tabs, because more open files dilute the relevant signal and the completion regresses to generic patterns instead of locking onto your actual API.

AI can help with this

Describe what you are about to complete in chat and say: 'What files should I have open in my editor before I start completing here?' Claude will tell you exactly what to pre-load for your specific call site.

You can now

✓

Run the same completion twice (once without and once with the relevant type file open) and demonstrate that the pre-loaded version uses your actual field names instead of invented ones.

Try it from memory

Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.

Without scrolling up, think of a real task where Claude's suggestion has to match something defined elsewhere. Which file would you open first, and how many files would you keep open?

One good answer: 'I'm adding a customer field to my order form. I'd open the file that defines the customer type first, then keep two or three related files open, not ten.' If your answer lists every file you own, trim it. Two or three focused files beat a crowd.

Key takeaways

Open the type definition or interface file before you complete against it. One extra tab open, substantially better completions.

  1. 1Inline completion only sees the current file and a few open tabs, not your whole project
  2. 2Open the type, interface, or schema file before completing at the call site that uses it
  3. 3Two or three focused files beat ten loosely related ones; more tabs add noise, not signal
  4. 4Editor restarts reset the context window, so re-pre-load your key files each session

Go deeper

  • Cursor Docs: Getting Starteddocs.cursor.com (opens in a new tab) ↗
  • Claude Code Quickstartdocs.anthropic.com (opens in a new tab) ↗
Up nextGraduate to Chat→

Was this helpful?

← Back to Level 2