[Feature Request] Add option to pre-populate editor buffer with previous assistant message as context

Status Open
Reported on v2.1.126
Maintainer reply None cached
Activity 0 comments · opened Jul 26, 2026

Bug Description
Title: Pre-populate $EDITOR buffer with prior assistant message as context when editing

Body:

When I hit Ctrl-G to compose/edit a message in $EDITOR, the buffer opens empty (or with just my in-progress input). For anything more than a one-liner, I want to reference Claude's last response while I'm writing — quoting specific lines, responding point-by-point, disagreeing with a specific claim, etc.

Right now the workflow is: /copy to grab the last response, switch to the editor, paste it as a comment block, then write my reply around it. That friction usually pushes me to just type inline in the TUI and lose the better editing experience.

Request: an option to pre-fill the editor buffer with the previous assistant message, commented out (using the comment syntax appropriate to the buffer's filetype, or a configurable prefix like > ). The commented lines would be stripped on save so they don't get sent as part of my prompt.

Possible shapes this could take:

  • A setting in settings.json (e.g. "editor.includeLastResponse": true)
  • A separate keybind (e.g. Ctrl-G opens empty, Ctrl-Shift-G opens with context)
  • A PreEditorOpen hook that lets me control buffer contents myself

Any of these would work — the hook version is the most flexible but the setting is the lowest-friction default.

Environment Info

  • Platform: linux
  • Terminal: kitty
  • Version: 2.1.126
  • Feedback ID: 3ad66f30-503f-48e4-85d3-e76099ae0f18

Errors

[{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-07-26T18:00:00.252Z"}]

View original on GitHub ↗