Review Four TypeScript Pull Requests in 55 Minutes with an AI Assistant
Company: Anthropic
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: hard
Interview Round: Onsite
You have 55 minutes to review four TypeScript pull requests, and you may use an AI assistant. For each pull request, work out what it is trying to change and whether it has problems serious enough to block it. Then pick one pull request and fix it yourself. Candidates report that the time is tight, and that when the AI reports a bug you should follow the call chain yourself so you can explain exactly under what conditions it would really trigger.
The contents of the pull requests were not reported, so this practice version asks how you would run the review; illustrate your answer with concrete TypeScript examples.
### Clarifying Questions
- What should the outcome be for each pull request: a decision (approve, request changes, block) with written comments, or a list of findings?
- Can you run the code and its tests, or only read the diffs?
- Should the fix be pushed to the pull request as a commit, and must it include a test?
- How much context is available: the whole repository, or only the diffs and their descriptions?
- What counts as blocking here: correctness and security only, or also missing tests and maintainability?
### Part 1: Triage four pull requests under a time limit
Plan the 55 minutes. For each pull request, establish its intent and decide whether it has blocking issues. What do you read first, what do you hand to the AI, and what do you write down?
```hint Intent before line comments
A diff can be tidy and still not do what its description claims. Decide what you compare the code against before judging individual lines.
```
#### What This Part Should Cover
- A time plan that leaves room for the fix and the write-up
- Checking each pull request's intent against its description and tests
- Clear criteria for blocking versus non-blocking findings
- Using the AI for breadth and leads, while keeping the decisions your own
### Part 2: Verify a bug the AI reports
The AI flags a possible bug in one of the pull requests. Show how you decide whether it is real, and how you explain the conditions that trigger it.
```hint Find a concrete input
A reported bug is real only if some caller can reach that line with a value or state that breaks it. Work out how you would walk from the entry points to the flagged line.
```
#### What This Part Should Cover
- Tracing the call chain from entry points to the flagged code
- Naming the concrete input or state that triggers the bug, or showing why none can
- TypeScript-specific traps: types erased at runtime, `any` and type assertions, non-null assertions, async control flow
- Writing the finding so the author can reproduce it
### Part 3: Pick one pull request and fix it
Choose one pull request to fix in the remaining time, and make the change.
```hint The smallest fix that proves itself
Consider which issue you can fix completely in the minutes left, with a test that fails before your change and passes after it.
```
#### What This Part Should Cover
- Choosing by severity and by what can be finished in time
- A minimal, scoped change with a test
- Stating what was left unfixed
### What a Strong Answer Covers
- Disciplined time management across four reviews and a fix
- Intent checked before details, with findings ranked by severity
- AI output treated as hypotheses and verified by tracing real call paths
- Concrete trigger conditions and evidence for every blocking finding
- A small, tested fix and a clear written summary
### Follow-up Questions
- The AI reports many issues on a short pull request, most of them about style. How do you keep your review useful to the author?
- You cannot tell whether a race in an async handler can happen in production. How do you settle it in a few minutes?
- A pull request passes all tests and type checks, but you believe it is wrong. How do you make the case?
- How would your review change if you knew the pull requests were largely written by an AI agent?
Overview: A timed code review exercise: review four TypeScript pull requests in 55 minutes with an AI assistant and decide which have blocking issues. It tests checking intent before details, verifying AI-reported bugs by tracing the call chain to a concrete trigger, and fixing one pull request with a test.
Read the full Anthropic Software Engineer interview experience this question came from