Amazon's New OA: The AI-Assisted Code Repository Section, Explained (2026)
Dec 3, 2026 · 13 min read
If you've opened an Amazon SDE assessment invite lately, it probably looked different from the guides you studied. Alongside the familiar algorithm question there's now a code repository task: a small, real-looking app with failing tests, a ticket describing what's broken, and an AI assistant built into the editor.
It's one of the most-asked questions on LeetCode Discuss this year, from "has anyone done the AI repo section?" to "I got 15/15 on DSA but 2/6 on the repo, am I out?". This post collects the official sources and a stack of first-hand reports into one explanation of the format and how to approach it.
📌 The short answer
- Amazon announced in January 2026 that its SDE assessments now let candidates work with an interactive AI assistant on a real coding platform.
- On HackerRank, the OA comes in two parts: a classic coding section (no generative AI), then a code repository section with an embedded AI assistant. You can't go back once you switch.
- The repo task is usually fixing bugs (sometimes adding a small feature) in a small web app. Common stacks are Spring Boot, Django and Node/MERN, with C++ in some intern versions. Candidates report around six tests.
- HackerRank says you won't be penalized for using the assistant, and it gives guidance rather than full solutions. Your conversation is recorded and shown to the evaluator.
- Typical timing from candidate invites is about 40 minutes for the algorithm question and 60 for the repo. Partial credit is real. Candidates have advanced with 4/6 repo tests.
What Amazon and HackerRank Say
Amazon's announcement. On January 22, 2026, Amazon published a post on its hiring changes. One section covered technical assessments: Amazon said it had reimagined them for software engineers so candidates can work with an interactive AI assistant on a real coding platform. The post doesn't describe the sections, timing or rules.
Amazon's prep pages haven't caught up. As of early December 2026, Amazon's OA prep pages still describe the classic format: about 70 minutes of coding, a work-style survey and a work simulation for university hires, and two coding questions plus system design questions for SDE II. They don't mention the repository section. That's why so many candidates are surprised when they open the test. The rules on those pages still apply: you may look up public resources, but not sites that need a login or private repositories, your browser usage is logged, and you should avoid copy-pasting.
HackerRank's candidate guide is the best source. HackerRank runs the assessment and publishes a "Preparing for your Amazon OA" guide. The key points:
| Coding section | Code Repository section | |
|---|---|---|
| What it is | Algorithm problems, 2 sample + 13 hidden tests | Multi-file, real-world task in an existing codebase |
| Generative AI | Not permitted | Embedded AI assistant |
| Language / stack | Chosen inside the test | Framework chosen from the invite; can't switch once the test starts |
| Examples | – | "Fix a bug on the Customer dashboard page," "Add a feature to check whether Express delivery is available" |
A few rules matter more than the rest:
- Order is fixed. Finish the coding section first. Once you move to the code repository section, you can't go back.
- The assistant helps but won't solve it. HackerRank says it gives contextual guidance without the full solution, and that you won't be penalized for using it.
- Your chat is part of your submission. The platform records your conversation with the assistant, and the evaluator can see the transcript.
- It can insert code. An Apply button places suggested code into the current file at your cursor. Several candidates describe it as a chat that explains and hints rather than an agent that edits the repo for you. Plan to make the fix yourself.
- Autosave counts. If time runs out, your last autosaved code is evaluated.
What Candidates Actually Got
We read ten first-hand Amazon OA reports from 2026 on LeetCode Discuss, plus summaries that aggregate many more. They agree on the shape and differ on details depending on level, country and stack.
The structure
A May 2026 SDE-1 candidate gave the clearest breakdown: question 1, an algorithm problem, about 40 minutes; question 2, about 60 minutes with the in-assessment AI assistant, fixing three bugs in a given codebase. The stack was a choice of MERN, Java Spring Boot or Django. Their repo was a Jira-like issue tracker, and they noted the bugs differ between candidates. Aggregated invites describe the same split: about 100 minutes total, 40 for the classic problem and 60 for the repo.
For new grads and some SDE-1 roles, the Work Style survey and a Work Simulation usually follow, as before. One October 2026 fresher described a video-proctored OA with all four parts: an algorithm question, a coding task with an AI chatbot, Work Style and Work Simulation. They received an offer.
The repos
The apps are small but realistic, usually a REST backend with layers you'd recognize:
- Movie database with watch lists. The most frequently reported, especially in Spring Boot and Django.
- Issue tracker. A Jira-like app, often in MERN.
- Car rental, movie reviews, support tickets. Less common variants.
- E-commerce returns and risk scoring in C++. Reported by interns in October and November 2026. The bugs were in JSON parsing, account relationships, the risk score calculation and the decision mapping.
An SDE II candidate in June 2026 described a classic controller / service / repository layout with six failing tests. They fixed five of six and received an offer.
The bugs
The bugs are the kind you'd see in a real codebase, not algorithm puzzles. Across reports, they include:
- Missing validation. Accepting an empty title or a negative quantity.
- Missing existence checks. Adding a movie that doesn't exist to a watch list, or returning 200 instead of 404.
- Changes that are never saved. Changing an in-memory object without persisting it.
- Wrong-type comparisons. Comparing a string ID from the URL to an integer ID in the database.
- Case-sensitive search where the ticket expects case-insensitive matching.
- Wrong routes or status codes.
- Business-logic slips. A Hyderabad SDE-2 candidate described finding a business-logic bug by navigating the code with the AI, then implementing the fix by hand. They were selected.
The scores that got people through
Partial credit appears to be the norm:
| Report | Algorithm | Repo | Outcome |
|---|---|---|---|
| SDE II, June 2026 | – | 5/6 | Offer |
| Intern, on-campus, Sept 2026 | 15/15 | 2/6 | Shortlisted |
| Experienced SDE (aggregated) | – | 4/6 | Phone screen |
| SDE (aggregated) | 11/15 | 6/6 | Cleared the OA |
Don't read too much into a single row. Amazon weighs the whole OA, and bars differ by role and region. But the pattern is clear. You don't need a perfect score on both parts. If one part goes badly, keep going. A strong repo section can make up for a weaker algorithm result, and the reverse.
Where the classic format still shows up
Not every invite has a repo section. Some reports from interns in Europe and campus hires in India in 2026 still describe two classic algorithm questions. Amazon's own prep page says the OA may come in one or two parts depending on the country. Read your invite. It tells you which sections you'll get and lets you choose the framework.
How to Approach the Repo Section
Here's a worked example built on the reported bug types. The app and the code are our own illustration, not an Amazon question.
You picked Django. The repo is a movie app with watch lists. The ticket says:
Users report: (1) adding the same movie twice duplicates it in the watch list, (2) searching "matrix" doesn't find "The Matrix", (3) removing a movie that isn't in the list returns 200.
Six tests, three passing.
1. Run the tests before anything else (2 minutes)
The failing test names are your map: test_add_duplicate_movie_is_idempotent,
test_search_is_case_insensitive, test_remove_missing_returns_404. Match each one to a line in the ticket. You now
have three independent bugs. Fix them one at a time and rerun after each.
2. Use the assistant to find code, not to fix it (5 minutes)
This is where the assistant saves the most time. It knows the repo and you don't. Good prompts:
- "Which view handles
POST /watchlists/<id>/movies? Give me the file and function." - "Where is movie search implemented, and what query does it run?"
- "What does
remove_moviereturn when the movie isn't in the list?"
Each answer is a pointer. Open the file and confirm it. Remember the transcript is visible to the evaluator. Short, specific questions look like an engineer navigating a codebase. "Fix all the failing tests" looks like you're hoping the AI does the work, and the assistant is designed not to.
3. Fix each bug at the cause (10–15 minutes each)
Search first, since it's the quickest:
# movies/views.py
def search(request):
q = request.GET.get("q", "")
results = Movie.objects.filter(title__contains=q) # case-sensitive
return JsonResponse([m.to_dict() for m in results], safe=False)
title__contains is case-sensitive. The fix is title__icontains. That's a one-word change, and the kind the
assistant can confirm in a sentence if you're unsure of the ORM lookup name.
Duplicates next:
def add_movie(request, list_id):
wl = get_object_or_404(WatchList, id=list_id)
movie = get_object_or_404(Movie, id=request.POST["movie_id"])
wl.movies.add(movie)
WatchListEntry.objects.create(watchlist=wl, movie=movie) # second write path
return JsonResponse(wl.to_dict())
There are two ways the movie gets added. The many-to-many add is already idempotent, but the extra create adds a
duplicate entry row. Which one is the source of truth? Check what to_dict() reads before deleting either. If the
response is built from WatchListEntry, the fix is get_or_create. If it's built from wl.movies, remove the extra
write. This is exactly where blindly pasting a suggestion goes wrong, and where 30 seconds of reading pays off.
Then the 404:
def remove_movie(request, list_id, movie_id):
wl = get_object_or_404(WatchList, id=list_id)
wl.movies.remove(movie_id) # silently does nothing if absent
return JsonResponse({"ok": True})
Check membership first and return a 404 if the movie isn't there. Look at how other views return errors and use the same format. Hidden tests often check the response body, not just the status code.
4. Run everything, then stop editing (last 5 minutes)
Run the full suite. If something unrelated broke, revert that change. Leave a few minutes at the end. Your last autosaved code is what's graded, and a half-finished edit can turn a passing test into a failing one.
The same bugs in Spring Boot and Node
The bug types carry over across stacks. Only the place you look changes. If you picked Spring Boot, the equivalent traps look like this:
// WatchListService.java
public WatchList addMovie(Long listId, String movieId) {
WatchList wl = repo.findById(listId).orElseThrow(NotFoundException::new);
Movie m = movies.findById(Long.valueOf(movieId)).orElseThrow(NotFoundException::new);
wl.getMovies().add(m);
return wl; // never saved: repo.save(wl) is missing
}
The change only exists in memory. Unless the method runs inside a @Transactional boundary that flushes it, it's
lost. A test that reads the list back gets the old data. Ask the assistant whether the method or class is annotated
@Transactional, then check the annotation yourself before deciding between repo.save(wl) and adding the
annotation. Also watch for == on boxed Long IDs, which compares references, not values, for numbers above 127.
That bug passes small test cases and fails on hidden tests with bigger IDs.
In Node/Express, the usual suspects are a missing await (the handler returns before the database write
finishes), a route registered after a catch-all so it's never reached, and an ID comparison between
req.params.id (a string) and a number from the database:
const item = items.find((i) => i.id === req.params.id); // "42" === 42 is false
Whatever the stack, it's the same move: run the failing test, find the handler, read the 10 lines around it, and fix the cause. The assistant is fastest at the "find the handler" step. Spend your own attention on the 10 lines.
Habits that cost points
- Pressing Apply without reading. The assistant's snippet goes in at your cursor. If the cursor is in the wrong place or the snippet assumes a different variable name, you've added a bug.
- Rewriting a whole file. Small, targeted fixes. The hidden tests expect the rest of the app to keep working.
- Switching sections too early. You can't return to the coding section. Finish or deliberately give up on the algorithm problem first.
- Choosing an unfamiliar framework. Pick the one you can read fastest, not the one you think looks impressive. In a
Spring Boot repo you'll need to find your way through
@RestController,@ServiceandJpaRepositoryquickly. In Django:urls.py,views.py,models.py. In Express: routers, middleware, models.
The Algorithm Section Still Counts
The first section is the Amazon OA you already know, with no generative AI. Expect one problem, sometimes two, at LeetCode medium level, with hidden tests. Recent reports include binary search on the answer and greedy problems. Practicing timed mediums is still the right prep for it.
Budget carefully. It comes first, and once you move on you can't come back. If you're stuck at the 30-minute mark, submit your best partial solution and protect your 60 minutes for the repo.
After the OA: AI Fluency in the Loop
Passing the OA no longer means AI drops out of the process. Candidates in 2026 describe AI coming up across Amazon's interviews:
- Bar raiser on AI fluency. An SDE-1 candidate in July 2026 had about 30 minutes of behavioral questions about AI: how they use it, how they stay efficient, and how they avoid relying on it too much.
- Leadership Principles with an AI angle. "How do you validate the output of AI tools?" and "Tell me about a time AI-generated code was wrong." (SDE2, August 2026.) A Senior SDE was asked about a process they had built with AI.
- GenAI scenario rounds. One SDE-1 was given a critical production issue to resolve within an hour, with AI tools allowed in the scenario, and was asked how they'd use AI without over-relying on it.
- Intern project deep dives that asked which AI tools the candidate used, where they gave wrong suggestions, and how the output was checked.
So prepare two or three real stories in STAR format: a time AI sped you up, a time AI was wrong and you caught it, and the checks you run before you trust generated code. They're likely to come up in your Leadership Principles rounds, not just your coding rounds.
How to Prepare in 10 Days
Days 1–2: pick your framework and learn its layout cold. Choose one of Spring Boot, Django or Node/Express. Clone a small CRUD app in that stack and trace one request from route to database and back. Do it until you can find "where is this endpoint handled?" in under a minute.
Days 3–6: repo-debugging reps. Do one timed, 60-minute repo task a day. Start with the failing tests, map them to the ticket, fix one bug at a time and rerun. We built practice repos with the same structure: a Spring Boot movie watch list, a MERN issue tracker, a Django car rental app and a C++ return-risk repo. Each comes with failing tests and an AI assistant.
Days 7–8: practice prompting for navigation. On a repo you don't know, limit yourself to questions that ask where and what, never fix. Get used to checking every answer in the code. Our guide to reading an unfamiliar repo covers this.
Day 9: one full mock OA. One algorithm problem in 40 minutes, then a repo task in 60, in that order, with no going back. Our mock OA runs the sections in sequence against a clock and gives you a report.
Day 10: AI stories for the loop. Write the three STAR stories above, and review the Leadership Principles they map to (Dive Deep, Insist on the Highest Standards, Learn and Be Curious).
FAQ
Can I use ChatGPT or Copilot in the OA? No. Generative AI isn't permitted in the coding section, and the repo section allows only the embedded assistant. Amazon's prep page also says your browser usage is logged.
Will using the assistant lower my score? HackerRank says you won't be penalized for using it. The transcript is visible, though, so use it the way an engineer would: to find things and check ideas, not to beg for answers.
Can the assistant write the fix for me? It can suggest code, and Apply inserts it at your cursor, but it's designed to give guidance rather than a full solution. Candidates report it hints at where the bug is rather than naming it. Expect to write the fix yourself.
What if I don't finish all the repo tests? That's common. Candidates have advanced with 4/6 and even 2/6 alongside a perfect algorithm score. Fix what you can cleanly and don't break what passes.
Which framework should I choose? The one you can read fastest. Reports cover Spring Boot, Django and Node/MERN, plus C++ for some intern versions.
Is this every Amazon OA now? No. Some 2026 invites, especially some intern and non-US ones, still use two classic questions. Your invite tells you.
Now take one against the clock
Timed sections in the same order as the real thing, with a report on what passed and where the time went.