OpenAI officially rolled out a major update to Code Blocks in ChatGPT, transforming them from static text boxes into a fully interactive, collaborative workspace.
This update effectively merges the traditional chat experience with the advanced editing capabilities previously found in the “Canvas” beta, making ChatGPT a much more formidable tool for developers.
Key Features of the New Interactive Code Blocks
The update moves beyond simple syntax highlighting, introducing several “IDE-like” features directly within the chat interface:
- Inline Editing: You can now click directly into a code block and manually edit the text. ChatGPT will understand your changes and can offer follow-up suggestions based on your manual modifications.
- Live Previews: For web technologies (HTML, CSS, JavaScript) and data visualizations (Mermaid diagrams, Python charts), a dedicated “Preview” tab allows you to see the rendered output side-by-side with the code.
- Split-Screen Review: When ChatGPT suggests a code change, it now opens a diff-style split-screen view, allowing you to review exactly what lines are being added or removed before you “Apply” the changes.
- One-Click Debugging: A new “Debug” shortcut appears on code blocks. When clicked, ChatGPT automatically inserts print statements or logs (in Python) to help you trace the execution and identify errors.
- Persistent State (REPL): An experimental js_repl runtime has been introduced, allowing code execution to persist its “state” across different tool calls within the same session.
How it Differs from “Canvas”
While Canvas (launched in late 2024) was a separate window, these new Interactive Code Blocks are integrated into the primary chat thread.
| Feature | Old Code Blocks | New Interactive Blocks (Feb 2026) |
| Editing | Read-only; required re-prompting | Fully editable inline |
| Collaboration | Passive (Copy/Paste) | Active (Side-by-side refining) |
| Previews | None (Text only) | In-chat rendering for web/diagrams |
| Versioning | No history | Built-in “Restore” to previous states |
Technical & Security Updates
Coinciding with this launch, OpenAI introduced Lockdown Mode on February 16, 2026. This is an optional security setting for Enterprise and Pro users that restricts how these code blocks interact with external networks to prevent data exfiltration via “prompt injection” attacks.
“We improved Code Blocks in ChatGPT to make them more interactive. You can write, edit, and preview your code in ChatGPT, all in one place.” โ OpenAI Release Notes, Feb 19, 2026.


