Skip to content

[FEATURE]: Proposal: Add a "Teach" Mode for Pedagogical, Learning-by-Doing Workflows #36521

Description

@ThibaultGH

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Note: This was previously discussed in #12675, which was auto-closed after 90 days of inactivity. I’m reviving the conversation as this feature is still highly relevant, especially given recent advancements in pedagogical LLMs (e.g., TeachLM, LearnLM, ACE-TA).

Describe the enhancement you want to request

Description

Modern coding agents like OpenCode, Mistral Vibe CLI, and Claude Code typically offer two primary modes:

  • Plan: A restricted mode where the LLM focuses on how to implement a solution, without executing any changes. This is ideal for brainstorming, reviewing, and ensuring alignment before action.
  • Build: An execution mode where the LLM can run tools (bash, git, MCP servers, etc.) to implement the plan.

While these modes are effective for productivity, they assume the user has sufficient expertise to supervise, validate, or even override the LLM’s actions. However, in domains where the user lacks ground truth or is actively learning, this dynamic breaks down. The user may blindly trust the LLM’s output, leading to errors, misconceptions, or missed learning opportunities.


The Problem

In practice, Plan mode is limited for users who:

  • Are new to a domain (e.g., a junior developer learning HPC, GPU programming, or a new framework).
  • Rely on the LLM as a knowledge source rather than a tool to assist their own expertise.
  • Need to acquire skills rather than just get tasks done.

Plan mode helps with planning, but it doesn’t teach or ensure the user learns by doing. Build mode, meanwhile, risks removing the learning opportunity by doing the work for the user.


Proposal: A "Teach" Mode

We propose a third mode: "Teach", where the LLM’s role shifts from doer to teacher. In this mode:

  • The LLM does not execute tasks (like Plan mode).
  • The LLM actively guides the user through the problem-solving process, using pedagogical best practices:
    • Scaffolding: Breaking tasks into manageable steps, with hints rather than direct answers.
    • Diagnostic Questions: Assessing the user’s current understanding and identifying gaps.
    • Progressive Disclosure: Revealing information only as the user demonstrates readiness.
    • Learning-by-Doing: Ensuring the user performs the critical steps themselves, with the LLM providing explanations, validation, and encouragement.
  • The LLM avoids "solution leakage" (i.e., giving away the answer or writing code for the user).

This mode would be ideal for educational contexts, such as:

  • Students learning to code or use new tools.
  • Developers exploring unfamiliar domains (e.g., HPC, GPU programming).
  • Teams onboarding new members.

Why This Doesn’t Exist Yet

  • Plan mode is designed for planning, not teaching. It lacks pedagogical awareness.
  • Build mode is designed for execution, which bypasses learning.
  • No existing "Teach" mode in OpenCode or similar tools : To my knowledge, no existing 'Teach' mode or equivalent pedagogical workflow exists in OpenCode or similar tools.

While research shows that the ideal approach for pedagogical LLMs involves fine-tuning or training models specifically for teaching (e.g., TeachLM, LearnLM, SocraticLM), these solutions are not easily accessible to most users. They require significant resources, expertise, and infrastructure.

A "Teach" mode in OpenCode would provide a practical, accessible alternative—leveraging existing models with prompt engineering, tool restrictions, and agent behavior tailored for pedagogy. This approach, while not perfect, would democratize access to pedagogical AI assistance without requiring specialized models.

  • Frameworks like ACE-TA, Code.org’s AI Tutor, and Khanmigo demonstrate that stepwise tutoring, scaffolding, and iterative feedback can be achieved without fine-tuning, using prompt engineering, context engineering, and agentic design. This makes a "Teach" mode in OpenCode a practical and accessible solution for pedagogical workflows.

Implementation Considerations

Note: I’m not deeply familiar with OpenCode’s internals, so I’d welcome guidance from the core team on feasibility and implementation. The following is a high-level sketch of how this might work, but I’m open to any corrections or alternative approaches.

  • New Mode: Add a teach mode alongside build and plan, with a read-only, pedagogical focus.
  • Agent Behavior: Use a custom prompt to guide the LLM to prioritize scaffolding, hints, and progressive disclosure over direct answers.
  • Tool Restrictions: Disable tools that modify files or execute code; allow only tools that explain, suggest, or validate (e.g., read, search).
  • User Experience: Allow toggling between modes (e.g., via Tab key) and log sessions for review (e.g., .opencode/teach/*.md).
  • Extensibility: Design the mode to be plugin-friendly, so pedagogical prompts or tools can be customized.

Open Questions:

  • Does this feature align with OpenCode’s goals?
  • Are there existing patterns or plugins that could serve as a starting point?
  • Would the core team be open to collaborating on a design or implementation?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions