You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Introduce a "Prompt Enhancement" feature similar to Kilo Code and Augment Code. This tool allows users to transform brief, informal instructions into high-fidelity, structured prompts by leveraging a dedicated secondary model and local project context.
Core Functionalities
Dedicated Enhancer Model Selection: Allow users to select a separate, lightweight model (e.g., GPT-4o-mini, Claude 4.5 Haiku, etc.) specifically for the enhancement task.
Custom Enhancement Instructions: Provide a settings field where users can define their own system prompt for the enhancer. This allows for personalized coding standards, such as "always include error handling and JSDoc comments in the generated requirements."
Contextual Injection:
AGENTS.md Integration: Automatically include the content of the AGENTS.md file (if present).
Chat History: Pass the recent chat history (if present) to the enhancer model so it can resolve pronouns (e.g., "fix that bug") and maintain continuity without the user needing to repeat context.
UX & Interaction Design
Trigger: Use the hotkey Ctrl + e to trigger the enhancement of the current text in the input field.
Behavior: Upon activation, the current draft is replaced entirely by the enhanced version.
Undo Action: If the user is unsatisfied with the result, pressing Esc immediately reverts the text in the input field to the original draft.
Visual Feedback: A subtle loading state (e.g., a "Magic Wand" icon animation) should appear in the input bar while the enhancer model is processing the request.
Reacted by Faddz, Jensen, 0xktn, frogconn, r4ravi2008, Saveliy Shiryaev, zedd3v, Valentin B.D. and phanium
I tried this feature on trae and it actually seems pretty useful. I wonder if there are any ready-made custom-tools that support this functionality now.
I've opened PR #17502 as a candidate implementation for this feature.
What's there:
<leader>p (ctrl+x p by default) triggers enhancement of whatever's currently in the prompt input
A lightweight model rewrites the draft and replaces the input text
esc reverts to the original immediately after enhancement, or cancels an in-flight request
The footer shows enhancing (model-name) during the call and esc revert once done
Uses the provider's small model by default (e.g. Haiku for Anthropic); configurable via agent.enhance.model in opencode.json
Recent chat history (last 5 user turns) is passed as context so the enhancer can resolve references like "fix that bug"
What's not there (trade-offs worth flagging):
No AGENTS.md injection — the enhance agent picks up InstructionPrompt.system() which includes instructions from AGENTS.md files, but it doesn't explicitly inject the raw file content the way the issue described. Happy to change this if there's a preferred approach.
No dedicated loading animation (no magic wand icon) — the footer text enhancing (model-name) is the feedback. Didn't want to add UI complexity without knowing what the team prefers.
TUI-only — the web/desktop app composer doesn't have this yet.
Activity
github-actions commentedon Jan 23, 2026
For keybind-related issues, please also check our pinned keybinds documentation: #4997
jensenojs commentedon Feb 2, 2026
I tried this feature on trae and it actually seems pretty useful. I wonder if there are any ready-made custom-tools that support this functionality now.
frogconn commentedon Mar 6, 2026
I've been testing this feature in Augment Code. It significantly boosts code editing efficiency. Great job!
jensenojs commentedon Mar 6, 2026
By the way, do we have the relevant hooks to make this feature into a plugin? I think I have a related issue
rjamestaylor commentedon Mar 14, 2026
I've opened PR #17502 as a candidate implementation for this feature.
What's there:
<leader>p(ctrl+x pby default) triggers enhancement of whatever's currently in the prompt inputescreverts to the original immediately after enhancement, or cancels an in-flight requestenhancing (model-name)during the call andesc revertonce doneagent.enhance.modelinopencode.jsonWhat's not there (trade-offs worth flagging):
InstructionPrompt.system()which includes instructions from AGENTS.md files, but it doesn't explicitly inject the raw file content the way the issue described. Happy to change this if there's a preferred approach.enhancing (model-name)is the feedback. Didn't want to add UI complexity without knowing what the team prefers.Tests:
packages/opencode/test/agent-enhance.test.ts(9 tests covering agent definition, permission rules, config overrides, and keybind defaults).Happy to take feedback on any of this — the model selection logic and history context size are the bits I'm least sure about.
zedd3v commentedon Apr 11, 2026
@thdxr
jensenojs commentedon Apr 22, 2026
jensenojs commentedon May 16, 2026
I don't want this issue to be closed,
jensenojs commentedon May 16, 2026
@R44VC0RP
github-actions commentedon Jul 16, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
jensenojs commentedon Jul 16, 2026
i will trying to implement it in sth like cursortab/cursortab.nvim#90