Using CodeAssist
Read the end-to-end CodeAssist user guide and start training your own personal coding model.
Overview
This guide walks you through every step of using CodeAssist, from the moment you launch it to the point you begin training your own personalized coding model, covering setup, coding behavior, rewards, training and best practices.
Video Walkthrough
If you're more of a visual learner, watch the video tutorial below for an end-to-end walkthrough on setting up and using CodeAssist, training models, and learn about best practices for improving model training.
How does CodeAssist Work?
Unlike typical code assistants, CodeAssist doesn’t offer suggestions you accept or reject.
It writes directly into your editor in real time, and your actions, such as when you type, fix, delete, or leave its output untouched, become training signals that shape how it learns from you.
Understanding the Assistant
CodeAssist runs two coordinated models:
A frozen language model (Qwen2.5) that proposes code edits, comments, or reasoning steps.
A trainable action-selection model that learns how to assist you based on your interactions and feedback.
You are not using an agent or an autocomplete system: rather, you are training an assistant!
What This Means
The assistant watches your typing and timing. When you pause, it may generate code, refactor what’s there, or insert a comment.
How you respond to those actions, such as accepting, modifying, or deleting determines how the model learns. This is the foundation of CodeAssist's reward vs. punishment system and are later interpreted as reinforcement signals.
Launch & Login
To install CodeAssist, visit the Getting Started page or use the platform-specific buttons below for detailed instructions on managing dependencies and installing CodeAssist.
After installation, it's time to start CodeAssist from your terminal:
uv run run.pyThis command spins up a local Docker environment and launches the web server at localhost:3000 which automatically opens in your device's default browser.

When the web UI loads, you'll see the Login Modal.

Here, you can log in with email, or with Google. Logging in with email will send a one-time passcode (OTP) to your email.
Selecting a Problem
From the Problems Sidebar on the left-hand side, you can choose Easy, Medium or Hard problems.
By default, you will have landed on a randomly-selected problem.
If you want to change your problem, you can select the difficulty level from the dropdown to be assigned a new problem in that difficulty, or click the Shuffle button to get a new problem within your selected difficulty.

Recording an Episode
Every time you run the launch command and open up CodeAssist in your browser, CodeAssist begins recording an episode.
Each click, keyboard stroke, edit, acceptance, or deletion is logged as training feedback.
This is how the model trains once recording is finished: it examines every action you took, then trains in an attempt to emulate you.
In that light, it is extremely important to work with the assistant patiently. Finishing solutions to LeetCode problems too quickly, or deleting everything the assistant adds to the .txt file immediately post-generation can neutralizing effects on the efficacy of that episode's training.
In other words, rushing the model and aggressively correcting won't give it the chance to learn.
Coding with CodeAssist
When you stop typing, CodeAssist may begin typing for you. It doesn’t ask for confirmation. Instead, it acts directly in your file.

At this point, when the assistant has generated code or made changes, you can:
Let its code stay
Edit or refine its generation
Delete entire lines
Rearrange code or fix indentation
Each of these choices then becomes a training signal post-recording.
Rewards & Timing
Leave the assistant's code untouched
Positive reward
Edit it after a short delay
Moderate positive reward
Delete it after working around it
Mild negative reward
Delete it immediately after it appears
Harsh negative penalty
If you delete everything it writes right away, you’re essentially teaching it to stop acting altogether.
Sometimes it’s better to let a generation live briefly, let it try one more move, and then delete or fix it to teach gradual correction and not total rejection.
Pausing
You can press shift + space or click the Pause Assistant button to temporarily stop the assistant. Typing anything (or even a space or cursor click) after pausing will unpause it.

No-Ops
When the assistant produces a No-Op, as in it does nothing, it's waiting for you. This is intentional. No-Op means the assistant is not confident enough to act. Make an an edit or press a key to resume.
Cursor Awareness
CodeAssist inserts code relative to your current cursor position. If your cursor sits at the bottom of the file and isn’t indented, new code may appear misaligned.
Keep your cursor near the section you’re working on. If something looks misplaced, re-indent with tab and shift tab or move your cursor before letting the assistant act.
Context
Each LeetCode problem has the actual written problem on the left side, with the text field on the right.
There's also a starter function. However, the starter function and imports are masked (read-only) to prevent the assistant from editing them.

If you want to modify those lines, make a small manual edit, even a space, to unlock them.
Unlocking (unmasking) the initial solution shell will open up that starting function to the assistant, which means it will gain context to the problem's solution, but can also change that starter function.
Keyboard Shortcuts & Controls
If you're relatively new to coding, there are several common keyboard shortcuts and controls commonly used when editing code in development tools that are handy to learn.
Pause / Resume
shift + space
Undo
ctrl/command + z
Redo
ctrl/command + shift + z
Indent / Outdent selected code
tab / shift + tab
Stop recording (end episode)
ctrl + c
Testing your Solution
When you're ready to test your code, click Submit Solution.
If your solution is incorrect, you will see a modal pop up that prompts you to return to the problem and try again.
Then, you will also see the Test Case section, which is a solution tester, containing Tests Passed, Error(s) Found In Case, and Cases Pending section.
This is a standardized solution tester which will contain input, stdout, and output, expected results, and any relevant errors (such as tracebacks) including the line the error was found on.
If your solution is correct, you will be prompted with a different modal to return the problem or proceed to a new one. Congratulations!


Completing an Episode & Training your Model
Once you're done coding, you can complete the episode recording and train the model. To do this, return to your terminal (or IDE, if running CodeAssist from within a developer tool like Cursor or VS Code) and input ctrl + c.
You do not need to successfully solve a LeetCode problem to train the model. At any point, once the CodeAssist web UI is running in your browser, you can stop training with ctrl + c.
During training, CodeAssist will:
Compare your edits to the assistants actions
Calculate rewards and penalties based on your reaction to the assistant's code generations
Updates your local model checkpoint
Take a few minutes (depending on your system specifications) and store new model weights under
~/.codeassist/modelsUpload your trained model to Hugging Face using your previously-set Hugging Face token

At this point, you can restart CodeAssist to use your updated model trained on your most recent episode.
Best Practices for Effective Training
Every user starts with a pre-trained baseline model tuned to generic behavior. As such, your first few episodes may feel inconsistent. This is normal.
Expectations
Early on, the model may feel 'too quiet' or 'too confident.' After 1-2 training runs, the model's performance can also regress as it begins calibrating to your coding habits.
Improvement becomes more and more clear after a minimum of 4-5 episodes of training.
Do
Treat CodeAssist as a collaborator, not an agent or an autocomplete tool.
Keep coding normally and let it naturally interject code.
Reward 'good enough' behavior by keeping useful code around for a minute before editing or removing.
Relax! This is experimental research, not an interview environment.
Record multiple varied problems to diversify its learning signals.
Don't
Expect it to solve problems end-to-end.
Delete every generation instantly, even if its wrong, as this will encourage 'passivity.'
Sit back and wait for it to code everything for you.
Panic when it begins typing unexpectedly or indenting pieces of code. Give it a moment to figure things out and patiently guide it towards outputting code that you want!
Iterating & Improving
After you've finished training, you can restart and rerun CodeAssist using the command below:
uv run run.pyThis will reopen the web UI, and you can select a new problem and begin coding again.
At this point, especially after 4-5 training runs, notice subtle changes in how CodeAssist acts: timing, confidence, where it chooses the help, how much code it generates and where, and especially any stylistic peculiarities it has when generating code comments.
Continue recording and training to refine your assistant over time!
Next Steps
CodeAssist is designed to explore what personalized assistance learning looks like, and a machine learning (ML) model that adapts to individuals through the curation of a 'dataset' containing one user's training data, not a general, globally-available dataset.
Visit the Troubleshooting page if you're having any issues with running or installing CodeAssist, setting up dependencies (like Docker) or running into problems training your model.
If you need additional support, you can open a ticket or visit our Discord.
Last updated