---
title: "How to restore agent-free AI Generate code feature in PHPStorm (and other Jetbrains IDEs)"
date: 'Tue, 22 Sep 2026 09:35:40 -0400'
author: jmcouillard
image: https://jmcouillard.com/sites/default/files/styles/fixed_width_1200/public/articles/107/celaning.jpg.webp?itok=Z5ySG-fM
published: true
type: blog
url: https://jmcouillard.com/en/blog/how-restore-agent-free-ai-generate-code-feature-phpstorm-and-other-jetbrains-ides
language: en
id: 107
---

With the newest version of IDEs, such as PhpStorm 2026.2.3, the right-click AI action named **Generate code** is now routing the request into the AI Agent panel, instead of making its magic into a temporary top banner.

![Right-click example](https://jmcouillard.s3.amazonaws.com/public/jmcouillard/generate-code-ai-agent.png)

The agent is much slower and more token hungry than the previous method. Furthermore, it doesn't follow the model selection instruction given in the preference pane:

![Preference pane](https://jmcouillard.s3.amazonaws.com/public/jmcouillard/generate-code-ai-agent-pref-pane.png)

This is a behavior that has been flagged in [the plugin reviews](https://plugins.jetbrains.com/plugin/22282-jetbrains-ai-assistant/reviews#144428) and is now tracked as [a feature request](https://youtrack.jetbrains.com/issue/LLM-31230).

In the meantime, to recover the previous behavior, follow those steps:

1. Open Help | Find Action and search for Registry.
2. Find `llm.action.generateCodeInplace.useAgenticChat`.
3. Disable this option, then restart the IDE.

This will restore in-editor generation with the Accept All and Discard All controls.

Another approach is also proposed in a [comment on the issue tracking entry](https://youtrack.jetbrains.com/issue/LLM-31230/Allow-switching-AI-actions-from-agent-back-to-AI-Chat#focus=Comments-27-14419793.0-0). It involves uninstalling Junie as an agent, and instead using its plugin version.
