- Stanford’s CS336 course, “Language Models from Scratch,” maintains AI agent guidelines that explicitly prohibit agents from generating core assignment solutions, including tokenizers, transformer blocks and optimisers.
- Under the policy, tools like GitHub Copilot and Cursor may only clarify concepts, point to documentation, or ask guiding questions, not write, edit or refactor student code.
Stanford’s CS336 course tells students to build language models from scratch, then bars the AI agents most capable of doing exactly that. The course’s AI agent guidelines draw a hard line: tools like GitHub Copilot and Cursor can explain and guide, but cannot write, edit or complete assignment code.
Why the Hard Line
CS336, titled “Language Models from Scratch,” walks students through the full stack: data collection, training, evaluation and everything in between. The course’s value is in the doing. According to the course documentation, AI agents should function as teaching aids, offering explanations and pointers, not solutions. That framing is a direct response to how capable modern coding agents have become. Copilot and Cursor can, in principle, plan and execute a complex coding task with minimal human input. A course built around implementation has to account for that.
What Students Can Actually Use
The permitted uses are narrow but real. Students can ask an agent to clarify a concept from lectures or readings, or get pointed toward relevant documentation and debugging tools. An agent can also review student-written code and flag edge cases or suggest where to look, as long as the feedback stays general and guides rather than solves. Debugging assistance is explicitly framed as asking questions and explaining error messages from Python, PyTorch and CUDA environments, not fixing the problem directly.
Where Agents Are Banned
The prohibitions are specific. Agents cannot write Python or pseudocode, fill in TODO sections, directly edit files in a student’s repository, run bash commands, or refactor code into a finished state. More pointedly, agents must not implement any core assignment component: tokenizers, transformer blocks, optimisers, distributed training logic. Converting an assignment requirement into working code, even partially, is off the table. The course requires students to write substantial amounts of code themselves, and the policy is designed to make sure that actually happens.
Disclosure and the Enforcement Problem
Stanford’s university-wide AI guidance defaults to requiring disclosure of any generative AI assistance unless a course says otherwise, and CS336 does not carve out an exception, though the course’s own materials don’t specify a particular disclosure format or mechanism beyond that general expectation. Enforcing the detail of these rules is harder. Discussions on Hacker News in June 2026 surfaced the practical difficulty: students could simply edit or avoid checking in the guidelines file, and there will always be a model outside the course’s guidance a student could reach for instead. Some educators floated an alternative closer to an oral exam: sitting down with students to walk through their work together, on the logic that a student who genuinely engaged with the material will perform very differently in that conversation than one who didn’t. Whether those approaches scale to a course of CS336’s size is an open question the policy does not resolve.
What This Means for CS Programmes
CS336 is not the only programme wrestling with this. The course’s approach, detailed permitted/prohibited distinctions rather than a blanket ban, reflects one way to think carefully about what AI agents are actually doing in an educational context, but the enforcement gap is real, and it widens as agents get more capable. Policies can specify intent; catching violations is a different problem. How widely other top CS programmes adopt similarly granular frameworks is not yet clear from public material, though the pressure to act is obvious. The university’s disclosure default at least creates a record, how instructors use that record in practice will shape whether the policy holds.



