When Should an AI Coding Assistant Ask Before Acting?
The interviewer asksYour AI coding assistant can edit files and run commands. Users complain it asks for permission too often, but one user lost work when it deleted a folder. How do you design when it asks?
Applied AI PMProduct Builder (secondary)CoreProduct sense roundRepresentative10 min
On this page
The 30-second version
- Two failures: too many prompts (users stop reading) and too few (lost work).
- Tier actions by reversibility and reach: reading and reversible edits free; destructive or external actions ask.
- Make more actions reversible (checkpoints, undo) so fewer need asking.
- Decide risk in code (command patterns, paths), not only by the model's judgment.
- Measure prompts per task, approvals without change, and lost-work incidents.
What it's really testing
- The interruption budget
- Matching autonomy to reversibility
- Making errors cheap to recover from
- Measuring both failure modes
How to structure your answer
- Name both failures.
- Tier actions by reversibility and reach.
- Make more things reversible.
- Decide risk reliably.
- Measure both sides.
The interview, played out
- InterviewerYour AI coding assistant can edit files and run commands. Users complain it asks for permission too often, but one user lost work when it deleted a folder. How do you design when it asks?
- CandidateThere are two failures here. Asking too often wastes attention, and users start approving without reading, which is how the deletion probably slipped through. Asking too rarely loses work. So the goal is fewer prompts, each one meaningful.
- Strong moveConnects over-prompting to the deletion: blind approvals.
- CandidateI'd tier actions by whether they can be undone and whether they reach outside the project. Reading files and searching: never ask. Editing files in the project: don't ask, but checkpoint so every edit can be undone. Running tests or builds: don't ask. Deleting, overwriting outside the project, installing packages, network calls, pushing code: always ask, showing exactly what will happen.
- InterviewerHow does it know which tier a command is in?
- CandidateThe model could judge, but that's unreliable for safety.
- Missed signalShould say up front that risk classification belongs in code, not only in the model.
- CandidateBetter: a code-level classifier for commands and paths, such as "rm", writes outside the project folder, and network access, with the model's judgment as an extra signal, not the decider.
- InterviewerAnd the lost folder?
- CandidateCheckpoints before every destructive action, so even an approved deletion can be restored. That turns a disaster into an undo.
- InterviewerHow would you know the design works?
- CandidatePrompts per task should drop. The share of prompts approved without changes should fall from near 100%, which shows prompts are meaningful again. And lost-work incidents and restores should go toward zero.
The strong answer, distilled
- Two failures: over-prompting leads to blind approval; under-prompting loses work.
- Tiers: read and search freely; project edits without asking but with checkpoints; tests and builds freely; destructive, out-of-project, install, network and push actions always confirmed, showing exactly what happens.
- Reliable risk detection: classify commands and paths in code; the model's judgment is a secondary signal.
- Reversibility: checkpoints before destructive actions, so even approved mistakes can be undone.
- Metrics: prompts per task, approval-without-change rate, and lost-work incidents and restores.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Framing | Fewer prompts | Balance | Both failures, linked by blind approval |
| Tiers | Ask for everything risky | A list | Reversibility × reach, with undo |
| Detection | Model decides | Mentions rules | Code-level classification, model as extra signal |
| Metrics | Satisfaction | Prompt count | Prompts, blind approvals, lost-work incidents |
Round scorecard: Applied AI PM: product sense round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| User and problem | Starts from the technology. | Picks a user and a need. | Picks a specific user and painful job, and says why it matters most. | Strong. Named both failure modes, too many prompts and lost work, as the problem. |
| AI fit | Assumes AI is the answer. | Says AI could help. | Explains why AI fits this job, and where it shouldn't be used. | Passable. Didn't consider that some checks are better done by code than by the model. |
| Experience design | "A chatbot". | A sensible flow. | Autonomy matched to error cost, with checking and correction designed in. | Strong. Risk tiers by reversibility, with undo making most prompts unnecessary. |
| Risks | None named. | Lists risks. | Ranks risks for this product and mitigates them in the design. | Strong. Treated destructive and external actions as always confirmed. |
| Success | Usage numbers. | A value metric. | A value metric, guardrails and an eval-based launch bar. | Strong. Prompts per task, blind-approval rate and lost-work incidents. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| Applied AI PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | The tiers, metrics and user research behind them |
| Product Builder | How you'd prototype and test the confirmation experience |
Common mistakes
- Solving only one of the two complaints
- Leaving risk classification entirely to the model
- No undo, so every mistake is permanent
- Measuring prompts without checking whether they're read
More follow-ups to practise
- "Power users want a 'never ask' mode." Hint: scoped, explicit, with checkpoints still on.
- "How would you set the tiers for a company's shared repository?" Hint: admin policy.
- "The assistant runs a long task overnight." Hint: batch the approvals up front.
Go deeper
- Module: AI product design patterns
- Framework: AI Product Sense Framework
- Framework: Opening Any Interview Answer
- Lesson: The interruption budget
- Lesson: The autonomy ladder
- Lesson: Patterns for trust and correction
- Also tests: Tools and agents
- Also tests: Safety, risk and safeguards
Sources
Representative question: written to match product sense rounds for AI PM roles, not a specific reported interview.