# --ide Flag

> It links the session to your code editor at the start.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude --ide, --ide

## Think of it like

It is like your phone finds your ear buds as soon as you turn it on.

## Definition

--ide links Claude Code to your code editor as soon as the session starts. It only does this when exactly one editor it can use is open. Once linked, Claude can see the file and lines you have open, and show its changes in the editor. If two editors are open, use /ide to pick one.

## Example

Emma always has VS Code open. She adds --ide to her start command, so each session sees the file she is looking at without a /ide step.

## Example code

```bash
claude --ide
```

Start and link to the open editor.

## Why it matters

Claude sees what you are looking at, so you point less and explain less.

## Common mistake

Expecting it to choose when two editors are open. It does nothing then. Run /ide and pick one.

## Three principles

- **At start.** No /ide needed.
- **One editor only.** Or it waits.
- **Sees your file.** And shows diffs.

## Related terms

- [/ide Command](https://learn.benibix.com/term/ai/ide-command)
- [Claude Code Surface](https://learn.benibix.com/term/ai/claude-code-surface)

## Taught in

- [Theme, View and IDE](https://learn.benibix.com/learn/ai-claude-code-commands/theme-view-and-ide): Claude Code Commands, 10/17

![Where each launch flag sends the session: the background, the app, your machines, your editor.](https://learn.benibix.com/diagrams/flag-launch.svg)

---

Source: https://learn.benibix.com/term/ai/ide-flag
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
