Steer, Review, and Fork VS Code AI Agents Precisely
Edit messages for clean agent interactions, steer mid-task via dropdown options, approve granular code diffs, fork sessions to explore branches, and restore checkpoints to undo changes without losing history.
Real-Time Agent Control via Edits and Steering
Edit previous messages directly to refine requests and maintain a clean chat history, avoiding messy follow-ups—click a message, update it (e.g., 'input should be provided by a CLI argument'), and confirm to undo prior edits and restart. This keeps agent responses focused on the latest intent. While the agent processes, steer it mid-task using the message dropdown: 'Steer' yields control at the next opportunity and injects your input (e.g., 'also add tests please'); 'Stop and send' halts everything to send a new message; 'Add to Q' queues it post-current task. Typing a single letter triggers options, enabling dynamic guidance without interrupting workflow, resulting in precise outputs like CLI args plus tests.
Granular Code Review and Selective Approval
After agent edits, a summary appears above the chat: e.g., 'changes to two files. Total 78 code lines added and two removed.' Click to keep all, per-file, or dive into diffs—additions show green, removals red, unchanged code neutral. Open files individually (e.g., main.py) to approve hunks or all via 'Keep' buttons, verifying functionality by running examples like CLI inputs '62' or '12323456' that decode correctly. This prevents bad changes from sticking, ensuring only verified code lands.
Session Forking and Checkpoint Rollbacks for Safe Experimentation
Fork sessions to branch explorations: use /fork in chat, the fork icon on completed actions, or after agent work—history carries over to a new tab (original remains intact). Ideal for diverging paths, like refactoring CLI to FastAPI in the fork while refining tests in the original. Restore checkpoints to rollback: select a prior point (e.g., pre-refactor), confirm 'remove your last request and undo edits made to two files,' reverting codebase and files exactly, perfect for ditching unwanted overhauls like 36 new HTTP tests. Combined, these let you experiment aggressively—allow all commands if needed—without risking your workspace.