Topic 1 of 5 · 4 min read
Learning modes in coding assistants
Goal: Configure a coding assistant to explain and leave marked parts for you to write instead of finishing the whole task.
A coding assistant will finish the whole task unless you set it up not to, so a learner has to switch on a mode, or write a prompt, that makes it explain and leave marked parts for you to write.
Check yourself · 1 of 3
You are learning Python and use a coding assistant. Which request best keeps the learning work with you?
Why it matters
Coding assistants such as Claude Code, GitHub Copilot, Cursor and Gemini Code Assist are tuned to be helpful, and "helpful" by default means "done". If you are learning, done is the wrong goal. In Anthropic's 2026 trial with 52 developers learning an unfamiliar Python library, people who handed the work to an AI assistant scored lower on a comprehension quiz than people who coded alone. The people who used the AI for explanations did not lose that understanding. The tool is the same. The way you use it decides whether you learn.
How to do it
- Use a built-in learning mode when your tool has one. Claude Code has a Learning output style (switch with
/output-style). It explains its choices and leaves small pieces of code for you to write. CS50.ai's duck is a separate tutor that answers with questions and hints rather than finished code. - If your tool has no such mode, put the rules in the first message (or in the project's instruction file, if it reads one). State your level, say what you want to write yourself, and say what the assistant must not do.
- Ask for a gap, not a solution. "Write the function signature and a comment for each step. Leave the loop body for me" gives you a real exercise.
- Make it check your work. After you fill the gap, ask it to review what you wrote and name one problem, before it shows its own version.
- Re-check the setting each session. Many tools forget the mode in a new chat.
Before and after
Before: Build me a function that removes duplicate emails from a list.
You get a finished function. You read it, nod, and learn little.
After: I know basic Python but I have not used sets. Explain in two sentences how a set could remove duplicates. Then give me the function signature and a docstring and stop. I will write the body. When I paste it, point out one bug or weakness, but do not rewrite it.
What goes wrong
- The mode quietly slips. After a long chat the assistant starts writing full solutions again. If it does, repeat the rule.
- "Teach me" with no constraint. The assistant explains in a paragraph and then pastes the full answer anyway. Say what it must not do.
- Using the mode for everything. On a task where you already know the skill and just need speed, a learning mode is a tax. Use it on the things you want to learn.
A short branch for engineers. A starter instruction for a tool that has no learning mode:
I am learning Python. For every task: explain the idea first,
write the signature and TODO comments only, and wait for my code.
Never paste a complete solution unless I type "show solution".
The words "show solution" give you an honest escape hatch. Using it is fine. Using it every time means you have turned the mode off.
Examples
A gap instead of a solution
Prompt: I am learning React. Write the TodoList component with a props type and a comment for each step. Leave the map that renders the items empty with a TODO(me) marker. When I paste my version, name one thing to improve.
The assistant now produces scaffolding. You write the part that teaches you how a list is rendered.
An escape hatch you can count
A rule such as "paste a full solution only when I type show solution" lets you get unstuck on purpose. If you notice you type it for every task, the exercise is no longer exercise, and you should shrink the task.
Key points
- By default a coding assistant tries to finish the task, which is the wrong goal while you are learning.
- Claude Code's Learning output style and CS50.ai's duck are built to explain and leave work for you.
- When a tool has no learning mode, state your level, what you will write and what the assistant must not do.
- Ask for a signature and TODO comments, then ask for a review of your attempt before it shows its own version.
- Modes can slip in a long chat, so repeat the rule when full solutions start appearing.
Common mistakes
- Assuming a tool's learning mode stays on in every new chat or project.
- Asking for a tutor but never saying what the assistant must not do, so it pastes the solution anyway.
- Using a learning mode on tasks where speed matters and nothing needs to be learned.
- Accepting the scaffolding and never writing the marked part yourself.
Check yourself · 2 of 3
What does Claude Code's Learning output style do?
Check yourself · 3 of 3
Your assistant has no learning mode. Which first message sets up a tutor-style chat?
Practice items, not counted towards your mastery.
Start here
- How AI assistance impacts the formation of coding skills (Anthropic) (opens in a new tab)ArticleFree
A randomized trial of 52 developers learning a new Python library: delegating to AI lowered comprehension, asking for explanations did not.
- Output styles, including the learning style (Claude Code docs) (opens in a new tab)DocsFree
How to switch Claude Code to the Learning style, which explains choices and leaves small pieces for you to write.
- CS50.ai, the CS50 duck tutor (Harvard) (opens in a new tab)ToolFree
A tutor built for beginners that guides with questions and hints rather than finished solutions.