Codex Desktop: make intentional code-block placeholders fillable before copying
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Codex Desktop / unified ChatGPT desktop app.
What feature would you like to see?
Allow assistant-generated code blocks to contain explicitly marked fillable placeholder spans. A user could replace values such as a project path, filename, port, branch, or host directly inside the rendered code block and then use the existing Copy code action to copy the resolved plain-text block.
The placeholder must be intentional metadata from the assistant/output representation, not broad regex detection of text that merely looks like a placeholder.
Useful behavior:
- marked spans are editable while the rest of the block remains read-only;
- repeated placeholders with the same identifier stay synchronized within that block;
- Tab / Shift+Tab moves between slots;
- unfilled slots remain visually obvious;
- Copy code emits normal source text with current substitutions and no UI metadata;
- ordinary code blocks remain unchanged.
Editing a slot should be local rendering state only. It should not alter the persisted assistant message, create a user message, persist across turns, or automatically become model context.
Why this is useful
Today, when a generated command contains one value the user must customize, the workflow is typically: copy the block, paste it into another editor, locate and replace the placeholder, reselect the result, copy again, then paste at the actual destination.
This would reduce that to: fill the marked value, copy, paste. It also reduces accidental changes to surrounding quoting, escaping, flags, or punctuation.
Acceptance criteria
- Explicitly marked spans can be edited without changing unmarked source.
- Repeated named slots can share a value within the block.
- Copy code returns the complete substituted block as ordinary plain text.
- Placeholder controls/metadata never appear in clipboard output.
- Editing does not mutate the persisted transcript.
- Existing syntax highlighting, wrapping, scrolling, and copy behavior remain unchanged for normal blocks.
Scope / non-goals
This is not a general message editor, automatic placeholder detection system, persistent-variable system, expression language, or code-execution feature. A separate request can address task-scoped remembered values.
Related: #44180 and #41298 both establish useful precedent for richer code-block presentation while keeping copied/original source clean and unchanged. #20593 concerns the existing Copy code affordance.
I did not find an existing request for fillable substitution points inside assistant-generated code blocks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by tracing the existing Copy code behavior referenced in #20593 and the richer code-block presentation precedent in #44180 and #41298. Define the rendering and clipboard entry points before implementing. Done means marked slots edit locally, repeated identifiers synchronize, copied output is plain substituted text, and ordinary blocks and persisted messages remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100