Amazon Files Patent for an AI Coding Assistant That Learns When to Speak Up
Amazon describes a tiny AI that doesn't write any code. It only decides when the big AI should speak up.

- Publication number
- US 2026/0386782 A1(US20260386782A1)
- USPTO patent title:
- Predicting Automatic Triggers for Obtaining Code Suggestions from a Generative Machine Learning Model
- Applicant
- Amazon Technologies, Inc.
- Filed · Published
- Aug 6, 2026 · Dec 3, 2026
- Inventors
- Mehdi Shojaie, Varun Kumar, Murali Krishna Ramanathan, Hantian Ding, Matthew Lee, Mahit Murthy, Zixuan Lin, Shao Hua Lo
- Status when we published
- Waiting for an examiner
- Document
- 20 claims
- US classification
- 717/104
- Parent application
- Continuation of 18/478,079 (filed Sep 29, 2023)(18478079)
What Amazon's code-suggestion timing patent does
You're typing a function and your AI coding helper keeps jumping in with a guess before you've finished your thought. You ignore it. Then it does it again. A few rounds of that and you're tempted to turn the feature off.
Amazon's patent application goes after the timing problem. Suggest too early and the AI doesn't have enough to go on. Suggest too late and you've already typed most of it yourself. So Amazon describes a small, fast second model whose only job is to decide, after each keystroke, whether this is a good moment to ask the big AI for help.
It makes that call by looking at what you're working on and how you've treated earlier suggestions: accepted, rejected or ignored. Over time, it learns your rhythm.
determine metadata describing a context for the code file and past code suggestion behavior for a user of the development environment …
Translation: The system looks at what you are currently writing and how you have reacted to past suggestions.
How the classifier decides to call the AI
The filing covers a two-model setup inside a code editor (what developers call a development environment). A large language model, or LLM (the type of AI that writes text or code), produces the suggestions. A separate, much smaller classifier (a model that sorts situations into yes or no) decides when to call it.
Each time characters are typed, the classifier can run. The filing says that could be every keystroke, after several characters, or on a timer such as every 2 seconds. It gets two kinds of input:
- Code context: the type of editor, the operating system, the programming language, the last character before the cursor, the line number, the cursor position and how long the current line is.
- Your history: whether recent suggestions were accepted, rejected or ignored (one example uses the last 4), plus the time gap between suggestions.
The output is a confidence score. In one example, a decision tree (a chain of if-then questions) lands on a result saying 67% of suggestions would be accepted, and anything above 60% triggers a suggestion. If the score is too low, nothing happens until the next character. If it passes, the code before your cursor goes to the LLM, and the answer appears with buttons to accept or decline.
The filing also describes a user setting for how often you want suggestions (frequently, moderately or infrequently), which moves the threshold. It describes combining the classifier's score with the LLM's own confidence to decide whether to show a suggestion, and packaging the feature as a plugin for a cloud-based code development service.
… a machine learning model trained to predict whether to automatically trigger obtaining a code suggestion …
Translation: An AI decides whether it is the right moment to offer help without you asking.
Why badly timed AI suggestions get switched off
If you write code with an AI assistant, the biggest annoyance is often the interruptions, not the quality of any single answer. A tool that learns when you tend to say yes could keep the feature useful instead of nagging. Developers who turn off a noisy assistant get no benefit from it at all.
There is a cost angle too. The filing points out that every unnecessary suggestion uses computing power and network bandwidth. Skipping the ones you would reject saves money for the company running the AI. This is a patent application, so it does not show that any product will ship with it, but it points at a problem every AI coding tool has to solve.
Amazon's 14th filing in the AI assistant and agent work we've tracked since May adds to a run that includes one on skipping redundant follow-ups and one on fact-checking cited links.
Source: US 2026/0386782 A1 at the USPTO (PDF). Full patent text and figures are in the official publication.
Get our take in your Top Stories
Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time Amazon patent news breaks.
We read the new patents from Big Tech, carmakers and more and send you the ones worth knowing. Plain English, free, every week.
The drawings · 8 sheets
8 drawing sheets from US 2026/0386782 A1 · click any drawing to enlarge

No comments yet