Skip to content

The Deska blog

Asking the Agent to Teach, Not Just Do

Learn how asking the agent to teach improves long-term developer velocity. Discover strategies for using AI agents to master new codebases and architectures.

10 min read

The rapid adoption of AI coding tools has fundamentally changed how we write software, but it has also introduced a subtle risk to professional growth. When developers rely on large language models to simply generate blocks of code, they often skip the critical internal process of understanding why a specific implementation was chosen. A more sustainable approach for long term career progression involves asking the agent to teach, not just do. By shifting the prompt objective from output generation to knowledge transfer, you turn every pull request into a personalized masterclass in system design and language idioms.

The Cognitive Cost of Outsourced Implementation

The temptation to treat an AI agent as a black box service is strong. You provide a requirement, the agent produces a function, and the test suite passes. However, this creates a knowledge gap where the developer becomes a supervisor of logic they cannot fully explain. Over time, this reliance can erode the ability to debug complex issues without assistance or to architect systems from first principles.

When you prioritize the act of teaching, you force the agent to articulate the trade-offs behind its suggestions. This practice ensures that you remain the primary architect of the system while using the AI to accelerate your acquisition of new patterns. It transforms the interaction from a simple transaction into a collaborative mentorship.

Strategic Prompting for Educational Outcomes

To move beyond basic code generation, your prompts must change in structure and intent. Instead of asking for a feature directly, you should frame your queries around architectural understanding and best practices.

  1. Ask for the "Why" before the "How": Before accepting a code block, ask the agent to explain the design patterns it intends to use.
  2. Request Alternative Implementations: Ask the agent to provide three different ways to solve the problem, highlighting the pros and cons of each.
  3. Code Review Requests: Paste your own code and ask the agent to critique it based on specific principles like DRY (Don't Repeat Yourself) or SOLID.
  4. Explaining Complex Regex or Algorithms: Use the agent to break down dense logic into human-readable steps.

This method turns the AI into a high-fidelity documentation layer for your specific project. It bridges the gap between static library documentation and the unique requirements of your existing codebase.

Leveraging Multi Agent Environments

Modern development workflows often benefit from seeing how different models approach the same problem. Some agents are optimized for speed, while others excel at deep reasoning or broad context analysis.

Agent TypeStrengths in TeachingTypical Use Case
Reasoning AgentsDeep architectural analysisExplaining race conditions
Fast Chat ModelsQuick syntax checksBasic boilerplate and API lookups
Integrated Workspace AgentsContextual awarenessExplaining file relationships

Platforms like Deska allow you to run multiple agents like Claude Code, Codex CLI, and OpenCode side by side. This setup is particularly effective when you are asking the agent to teach. You can ask one agent to generate a solution and another to act as a skeptical reviewer. By observing the "disagreement" between models, you gain a nuanced understanding of the technical trade-offs involved in your specific task.

Using the Workspace as a Classroom

An infinite canvas provides the physical space necessary to map out these educational sessions. When you are learning a new framework, you can place your terminal, the code editor, and the agent chat in a single view. This spatial organization helps maintain the mental model of the system.

Within Deska, you can zoom out to see the entire flow of an agent session alongside your notes. If an agent explains a complex concept, you can immediately test that concept in a terminal panel or a browser widget without losing the context of the explanation.

The Ask Deska assistant can further facilitate this by managing the workspace for you. You can use voice commands to ask the system to open relevant documentation or historical chat logs, allowing you to stay in the flow of learning. This reduces the friction of context switching, which is often the biggest barrier to deep technical study.

Transitioning to a Local First Mindset

When asking the agent to teach you about sensitive internal systems, privacy becomes a paramount concern. You need to know that the details of your proprietary architecture are not being used to train future public models.

A local-first approach ensures that your code and session data stay on your machine. This security allows you to be more transparent with the agent, providing it with the full context of your private modules so it can give you more accurate and relevant explanations. By maintaining data and storage locally, you protect your intellectual property while still benefiting from advanced AI reasoning.

Continuous Learning on the Move

Learning does not always happen at the desk. Sometimes the best time to review an agent's explanation of a complex refactor is during a commute or a break. The ability to monitor these long running teaching sessions via a mobile app allows you to stay connected to your progress.

Because the mobile connection uses a secure relay to pair directly with your desktop, you can safely read through the agent's logic explanations without exposing ports or compromising the security of your local environment. This enables a continuous cycle of reinforcement, where you can reflect on the lessons learned during the day and return to the keyboard with a clearer plan.

FAQ: Asking the Agent to Teach

How do I stop AI agents from just giving me the code?

You should explicitly instruct the agent in its system prompt or at the start of a thread to act as a tutor. Use phrases like "explain the logic step by step before writing any code" or "provide hints rather than a full solution." This forces the agent to engage in a teaching dialogue rather than a simple generation task.

Can AI agents help me learn a new programming language?

Yes, they are exceptionally good at this when prompted correctly. Instead of asking for translations, ask the agent to explain the idiomatic way to handle a specific problem in the new language compared to one you already know. Use the side by side panels to compare the implementation in both languages simultaneously.

Is it safe to share my code with AI for learning purposes?

It depends on your configuration. If you use a BYOK model with local tools, you have more control over your data. Always check the privacy settings of the specific agent and the platform you are using to ensure your proprietary logic is not being stored or used for training without your consent.

Enhance Your Workflow with Deska

Moving from passive code consumption to active learning requires the right environment. Deska provides a free desktop workspace for Mac, Windows, and Linux that helps you organize your AI agents and development tools in a single, infinite canvas. By running agents like Claude Code or Codex CLI side by side, you can compare their logic and deepen your understanding of every line written.

Download Deska today to start building a more informed and resilient development practice.