The Interviewer Asks: 'AI Can Write 80% of the Code, Why Do We Still Need You?'
面试官问你:“AI 能写 80% 的代码了,公司为什么还需要你?”
This Question is Becoming Increasingly Frequent
Let's start with a fact: Tech interviews in 2026 are already completely different from two years ago.
Two years ago, interviews asked: "Hand-write a Promise," "Explain the principles of React Fiber," or "What is the browser rendering process?"
Now, interviewers assume you can use AI. What they truly want to know is: In an era where AI can write code, what is your indispensability?
I asked around in tech communities, and this year there are at least three ways this question is posed:
- "AI can write 80% of the code, what is your value?"
- "If I give you an intern + Claude Code, can they replace you?"
- "What is the division of labor between you and AI?"
Essentially, it's the same question. Answer it poorly, and you're out.
Most People's Answers Fall into Traps
I've collected some common answers that interviewers are generally dissatisfied with:
❌ Answer One: "AI-generated code quality isn't good enough; humans are still needed to write it."
This answer might have been acceptable in 2024. It won't be in 2026.
The code quality generated by Claude Code and Codex is already quite high. For most CRUD APIs, form components, and utility functions, AI writes them better than many junior developers. If you say "AI code quality isn't good enough," the interviewer will likely think: Does that mean your skill level is similar to AI's?
❌ Answer Two: "AI doesn't understand business requirements."
The interviewer will follow up: "If the product manager writes the requirements clearly, couldn't AI understand them then?"
You'll find it hard to refute. Because the truth is—most requirements can indeed be clearly described in natural language, and AI can indeed generate code based on those descriptions.
❌ Answer Three: "Someone is always needed to do Code Review."
This answer positions yourself as an "AI quality inspector." The interviewer will think: A quality inspector doesn't need a 20,000 salary.
How I Answered Later
After being asked four times, I realized one thing: This question isn't testing your attitude towards AI; it's testing your understanding of your own value.
My current answer is divided into three layers:
Layer One: AI Writes Code, Humans Make Decisions
"AI can write 80% of the code, but it cannot make the 20% of decisions."
Let me give a concrete example. Last month, we were building an e-commerce campaign page, and the requirement was to "display a countdown after the user places an order."
AI can perfectly write a countdown component. But it won't ask you these questions:
- What happens if the user's page remains static after the countdown ends? Automatic refresh or a pop-up notification?
- If the user changes their local time, will the countdown be bypassed?
- Under high concurrency, if tens of thousands of people's countdowns hit zero simultaneously, can the backend handle it? Should the frontend implement request queuing?
- Does this countdown need to synchronize with server time? What if the client's time is inaccurate?
Each of these questions could lead to an online incident. AI won't proactively think of them, because AI only solves "the problems you present," not "the problems you haven't thought of."
The value of a senior developer isn't writing code; it's knowing which code shouldn't be written, which scenarios will cause issues, and which decisions will impact maintenance costs for the next six months.
Layer Two: AI Can Write a File, Humans Can Design a System
"AI is an excellent executor, but it lacks a system perspective."
Ask Claude Code to write a user registration API, and it can do it very well. But ask it to design an entire user system, and it won't know:
- Should registration and login be split into two microservices?
- How should user data be sharded and partitioned? By
user_idhash or by registration time range? - Should sessions use JWT or Redis? What are the trade-offs for each?
- If third-party logins (WeChat, Google) are to be integrated in the future, should the current table structure reserve extension fields?
These are architectural decisions, requiring comprehensive judgment based on business scale, team capabilities, current tech stack, and future plans.
AI can list 5 solutions for you, but it doesn't know which one is suitable for your company. Only humans can make that judgment.
During my interview, I said one sentence that made the interviewer nod:
"AI has lowered the barrier to writing code, but it has raised the barrier to making correct decisions. Because code generation is so fast now, wrong decisions can turn into a huge amount of technical debt much faster than before."
Layer Three: AI Cannot Be Held Accountable for Results
"If a production incident occurs, AI won't be called on-call."
This layer might sound like a joke, but it's the most fundamental.
Code is deployed to production, and an alert goes off at 3 AM. Someone needs to:
- Assess the scope of impact
- Decide whether to roll back
- Coordinate multiple parties (frontend, backend, operations) for troubleshooting
- Provide a fix within half an hour
- Write a post-mortem report and drive process improvements afterward
Each of these tasks requires judgment, communication skills, and a sense of responsibility. AI can help you check logs and analyze stack traces, but it cannot make decisions or bear responsibility.
When a company hires you for a 20,000 monthly salary, they're not buying your time to write code; they're buying your judgment and sense of responsibility.
What Interviewers Truly Want to Hear
To summarize. The correct answer structure for this question is:
| Layer | Core Point | One-liner |
|---|---|---|
| Execution | AI writes code, humans make decisions | AI solves problems you present, but won't discover problems you haven't thought of |
| Architecture | AI writes files, humans design systems | AI can list solutions, but doesn't know which is suitable for your company |
| Responsibility | AI cannot be called to fix bugs | Companies buy judgment and responsibility, not just code |
Finally, an extra credit action: Provide a real-world example.
Don't just vaguely say "AI isn't good enough." Describe a scenario you personally experienced:
"Last month, AI helped me write a data export feature, and it ran perfectly. But during my review, I noticed it didn't implement pagination—loading 100,000 records all at once. This was fine in the test environment, but in production, it would directly lead to an Out Of Memory error. AI wouldn't realize this problem because it doesn't know the scale of your production data."
A concrete example is worth ten correct but empty statements.
Core Competencies for Frontend in the AI Era
If you're still agonizing over "whether to learn AI," the question itself is wrong. AI is a tool, not a competitor.
The real question to ask is: What abilities become more valuable as AI gets stronger?
- System Design Capability — The faster AI generates code, the higher the cost of incorrect design.
- Business Understanding — Understanding the "why" behind requirements, not just "what" to do.
- Cross-team Collaboration — Coordinating frontend, backend, product, and design; this isn't something code can solve.
- Production Incident Response Capability — Being able to handle, diagnose, fix, and prevent future incidents when things go wrong in production.
These four capabilities become more scarce and valuable as AI gets stronger.
Conclusion
Next time you're asked in an interview, "AI can write code, what's your use then?", don't panic.
This question isn't meant to challenge you; it's an opportunity to showcase high-level thinking. Those who can answer this question well are precisely the most valuable people in the AI era.
Have you been asked similar questions in interviews? How did you answer? Let's discuss in the comments.