What is Cursor Tab? Autocomplete in Cursor, Codex, Grok
By Flavio
Cursor Tab suggests the next edit as gray text while you type. How Tab, Escape, and jump-in-file work, and the next-message predictions in Codex and Grok.
Cursor Tab is autocomplete inside the Cursor editor. As you type, it offers the next edit as gray text ahead of the cursor. The suggestion comes from your recent edits, the surrounding code, and linter errors.
Tab inserts that text into the file you have open. Agentic coding is the prompted session, with tools and a diff you review.
How Cursor Tab works
You type. Gray text appears in front of the cursor. Tab accepts the whole suggestion. Escape drops it, and so does keeping typing. On a Mac, Cmd+Arrow Right accepts one word. On Windows and Linux that chord is Ctrl+Arrow Right.
A suggestion can cover more than the current line. Tab can change several lines, add a missing import, and propose edits that belong together. After you accept one, Tab again jumps to the place it thinks you will edit next. That jump is called jump-in-file. When the next edit is in another file, a portal window opens at the bottom of the editor.
The shortcut name in Keyboard Shortcuts is Accept Cursor Tab Suggestions. Remap that if Tab already means something else in your layout.
Cursor Tab in each tool
Only Cursor documents this buffer autocomplete. Codex and Grok Build document a different Tab: ghost text for your next message, after the agent has already replied. Claude Code does not document either one.
| Claude Code | Codex | Cursor | Grok Build | |
|---|---|---|---|---|
| Suggests the next code edit | Not documented | Not documented | Cursor Tab, gray text in the file | Not documented |
| Accept | Not documented | Tab accepts a message draft, and does not send it | Tab accepts the edit. Cmd+Arrow Right or Ctrl+Arrow Right accepts a word | Tab accepts next-prompt ghost text |
| Where it appears | Not documented | The message box, after a reply | Ahead of the cursor in the editor | The prompt, after a turn |
| How you turn it off | Not documented | Settings, General, Composer, Show predictions | The Tab status indicator, or Cursor Settings, Tab | prompt_suggestions under [ui] |
Claude Code
Claude Code does not document file autocomplete. Shift+Tab in Claude Code cycles permission modes. That chord is unrelated to inserting a suggestion.
See Claude Code permission modes.
OpenAI Codex
Composer predictions suggest your next message in the Codex desktop app, after Codex finishes a reply. Tab accepts the suggestion as an editable draft in the message box. Typing your own message dismisses it. Accepting does not send the message.
The feature is in beta. The page limits it to people 18 and older, on a personal ChatGPT Pro plan, in supported regions. It runs in local and SSH threads, on GPT-6 Astra, GPT-6.1 Sol, and GPT-6.1 Terra. Eligible accounts have it on by default. The toggle is Settings, then General, then Composer, then Show predictions.
A prediction uses the current thread. It does not look up memories or connected apps on its own. If that context is already in the thread, it can shape the suggestion. Generating the suggestion does not count toward Codex usage. Sending the message does.
The IDE extension docs do not describe Tab completion inside a source file. codex completion writes shell completion scripts. That is the shell, not the editor.
See Composer predictions.
Cursor
The help page is the source for the keys above. Turn Tab off from the Tab status indicator at the bottom right of the window. Snooze pauses it for a duration you pick. Disable globally turns it off for every file. Disable for specific extensions turns it off for types such as markdown or JSON. The same controls live under Cursor Settings, then Tab.
Rules do not change Tab. Cursor’s rules FAQ says rules do not impact Cursor Tab or other AI features.
The CLI config key suggestNextPrompt suggests a follow-up prompt after a turn. That key lives in ~/.cursor/cli-config.json. Cursor Tab is the gray text in the editor.
See Cursor Tab.
Grok Build
Grok Build does not document autocomplete inside a source file. prompt_suggestions under [ui] in ~/.grok/config.toml is next-prompt ghost text after each turn, and Tab accepts it. The default is true. Set it to false to turn that ghost text off.
See Grok Build settings.
Details checked against each vendor’s documentation in November 2026.
A real example
You are in a React file and the linter is already complaining that useState is not imported. Cursor Tab can offer the import as gray text, including on a line you are not typing on, because it reads linter errors and can edit more than the current line. Tab inserts it. Escape leaves the file as you typed it.
If Tab is fighting you in a markdown note, use the status indicator and disable it for that extension, or snooze it. Remap the accept key by searching for Accept Cursor Tab Suggestions.
Codex’s closest control is the Show predictions toggle, and it fills the message box rather than the file. Grok’s is:
[ui]
prompt_suggestions = false
When to use Cursor Tab
Use it while you are typing the code yourself and the next edit is local: a line, an import, a matching change a few lines away. IDE, CLI, or a vibe tool is the choice of where you work. Tab only exists in the editor half of that choice.
Switch to the agent when the change needs a search, a test run, or a file you have not opened. Tab offers gray text while you type. A prediction in Codex or Grok fills the next message, and you still send it.
Pitfalls
Tab is easy to accept by reflex. A multi-line suggestion can add an import and rewrite a call in the same keypress. Read the gray text. Escape is the reject key if you have not pressed Tab yet.
Jump-in-file moves the cursor after an accept. If the portal window offers another file, that edit is still a suggestion until you accept it there. Closing the portal is how you stay in the file you meant to edit.
Rules files will not steer Tab. A project rule that says “never add this import” applies to the agent, and Cursor’s FAQ says it does not impact Tab. Review the gray text the same way you would review your own typing.
Codex predictions and Grok’s prompt_suggestions look like Tab and insert into the prompt. They do not edit the buffer. Accepting one still leaves you on the hook for sending it.
Related on flaviocopes.com
- IDE, CLI, or a vibe coding tool is the editor-plus-agent setup where Tab lives. The post names Cursor as that kind of IDE.
- Rules cover the instruction files that do not change Tab.
- Agentic coding is the prompted agent, which is a different action from accepting gray text.
Related glossary entries
- Rules: Project rules are durable instructions a coding agent loads for a repo. How they work in Cursor, Claude Code, Codex and Grok Build, and when to skip them.
- Agentic coding: Agentic coding means directing an agent that reads your repo, edits files and runs commands. How that loop works in Claude Code, Codex, Cursor and Grok Build.
Want me to talk about your product? You can sponsor this site.