Agent Mods — Copilot & Claude Code
Prompt rewrites, three next prompts, a read-only Verify scout, a turn countdown and new-session wipes, around GitHub Copilot Chat and Claude Code.
A port of claude-mods, the Claude Code terminal mods, to VS Code: backstage, cues, eta-band and wipe. It works with Copilot Chat (the VS Code chat and the Agents window), Copilot CLI and Claude Code, and its own model calls go through Copilot by default.


Quick start
- Install Agent Mods from the Extensions view (or
code --install-extension orfila-antoine.agent-mods). To try what is coming, pick Switch to Pre-Release Version on the extension's page.
- On first start, accept Install when it offers to follow your Copilot Chat sessions (see What it changes on your machine).
- Chat as usual. Agent Mods sits in the buttons under the chat input (✨ 🪄 ✏️ 💡 🔍); the countdown and the
next: step sit in the status bar. Agent Mods: Open Backstage in an editor tab shows the full Backstage panel.
VS Code cannot let an extension draw inside the chat or rewrite its messages. So Agent Mods follows each session from its live transcript and works through VS Code's own surfaces: buttons under the chat input, whose text it reads and replaces but never sends, two status bar items, and a Backstage panel in an editor tab on request. It adds nothing to the activity bar.
backstage
A sharp prompt in one key. In the Backstage panel, type a draft. ✨✏️ (Ctrl+Enter in the draft, r in the view, Ctrl+Alt+R anywhere) rewrites it clear and precise from the recent conversation. Refine… rewrites it in a direction (Clarify, Simplify, Distill, Focus, Harden, Expand, Overdrive), Write prompt… writes one as a type (Question, UI change, Bug fix, Feature / ticket, Code review, Investigation, Tooling / config), from scratch when the draft is empty. The result replaces the draft and fills the chat input; you press Enter. Undo brings the draft back until you edit it.
Catch Claude bluffing. Verify sends a read-only scout (Read, Grep and Glob only) to check the sentence selected in the editor; with nothing selected, it first picks the weakest claim of Claude's last answer. The verdict, CONFIRMED, REFUTED or INCONCLUSIVE with its evidence, shows in the panel and as a notification. Refute… checks a sentence you type.
Three next prompts, not one. After every answer, three distinct moves rain in as random letters and decode: the next step, the open point, a check. Click one or press 1 2 3 in the view (Ctrl+Alt+1..3 anywhere) to put it in the chat input. Nothing is ever sent for you.
Hand off before the context fills up. From 50 % of context, Handoff → new chat appears, coloured like the gauge. It puts /session-handoff in the chat; when the answer starting with # Session Handoff arrives, a new chat opens with the summary in its input. It needs a session-handoff skill, prompt file or command in your setup.
Keys in the Backstage panel: r rewrite · i Refine… · w Write prompt… · v Verify · u Undo · p Handoff · 1 2 3 suggestions.
Buttons sit in the toolbar under the chat input, and keys work while the input has focus:
| Button |
Key |
|
✨ $(sparkle) |
Ctrl+Alt+R |
Rewrites what you typed in the chat input, clear and precise, and puts the result back in its place. |
🪄 $(wand) |
Ctrl+Alt+I |
Refines it in a direction: Clarify, Simplify, Distill, Focus, Harden, Expand, Overdrive. |
✏️ $(edit) |
Ctrl+Alt+W |
Writes it as a prompt type (Question, Bug fix, Feature…), from scratch when the input is empty. |
💡 $(lightbulb) |
Ctrl+Alt+N |
Picks one of the three next prompts, or the Next: step, into the chat input. Shown once there are some. |
🔍 $(search) |
Ctrl+Alt+V |
Verify. |
↗ $(export) |
|
Handoff → new chat. Shown from 50 % of context. |
⏱ $(watch) |
|
Time left in the turn, sub-agents and something to do meanwhile. Shown while the agent works. |
The chat input has no API: Agent Mods focuses it, selects all, and copies (to read, restoring your clipboard after) or types (to write). If the typing ever lands outside a chat input, it is undone at once. agentMods.insertMode decides where prompts go: auto types into the composer in the Agents window and opens the chat with the prompt elsewhere, type, chat or clipboard.
cues
- The status bar shows
→ next: … from the Next: line the agent ends each answer with; click it to put it in the chat input.
- A new session opens with
Week 3 in a row, rest days are free. and Resume: <your bead in progress> (from .beads/issues.jsonl when there is one), in the panel and the status bar for 20 s.
- A successful
git push plays eight sparks and pushed 9199dfc -> main at the top of the panel when the turn ends, and in the status bar for 3 s.
The Next: line and the option consequences come from two lines of context. For Copilot they ride on the sessionStart hook of ~/.copilot/hooks/agent-mods.json while agentMods.cues.enabled is on; for Claude Code, Set up hooks… can add them as a UserPromptSubmit hook in ~/.claude/settings.json. Both ask first; Agent Mods: Remove hooks takes them out.
eta-band
While Claude works, the status bar shows the time left (00:07:08 left · tasks 1/3), and the panel one line per running sub-agent with its current tool, its model and its own countdown, plus something to do meanwhile.
The estimator is the original one, unchanged: tasks left in Claude's task list times how long a task takes you, the sub-agents still running each estimated from past runs of its type (parallel agents end when the last one does), and the shape of the prompt alone only once it has proven close on your own turns (ten of them, seven in ten within a factor of two). Without either, it reads working with the time elapsed. The countdown only moves earlier unless new tasks or agents appear; once past, it reads longer than usual. Time waiting for your answer to a question is not counted. The ⏱ button under the chat input shows the same, which matters in the Agents window, where there is no status bar; once a turn runs past its estimate, one notice says so (agentMods.eta.alert). History keeps the shape of each prompt, never its text, in VS Code's global storage. The meanwhile line asks the scout model for one of your open beads that fits the time left, at most once per duration range every 30 minutes.
mirror
After each answer, mirror looks at the last three turns for a spiral: the same request three times (60 % of words in common, four words or more), three answers that say the same thing, or the same tool failing three times in the last turn. It then shows 🪞 Spiral: … once, with Break the loop, which puts in the chat input (after what you typed):
Stop iterating. Name the assumption that might be wrong, then ask me one diagnostic question before changing anything.
and What repeats, which shows the repeated request or the last failing call. Agent Mods: Break the loop does the same at any time. No model call.
wipe
When a new session starts (a new chat, /clear, /new), the Backstage panel replays the previous conversation as text and plays one effect for 1.5 s: blackhole, fall, dust, fade or tv, random by default (agentMods.wipe.effect). Agent Mods: Play a wipe… plays one without clearing anything. The chat itself cannot be animated: the wipe plays in the view, when it is visible, as soon as the new session writes its first line.
In the Agents window
The Agents window has no status bar for extensions, so Agent Mods lives there in the buttons under the chat input (✨ 🪄 ✏️ 💡 🔍) and their keys. Agent Mods declares Agents window support, so it is enabled there by default; if it is not, turn it on in Customizations › Extensions and select Restart Extensions, or set "extensions.supportAgentsWindow": { "orfila-antoine.agent-mods": true }. It must be installed in the default profile.
To also see the Backstage panel there, run Agent Mods: Open Backstage in an editor tab, or set agentMods.agentsWindow.openBackstage to always. Agent Mods: Set up hooks… can also install an Agent Mods Backstage canvas (a Copilot extension in ~/.copilot/extensions/agent-mods/) for local sessions on the Copilot harness with chat.canvases.enabled; there, a click on a suggestion sends it into the session.
What it changes on your machine
- Reads, locally: the agents' transcripts (below) and VS Code's chat storage for the current workspace, and
.beads/issues.jsonl when a project has one.
- Writes, only after you accept:
~/.copilot/hooks/agent-mods.json (Copilot hooks that just exit, plus the cues as session context), the canvas extension in ~/.copilot/extensions/agent-mods/ (with the address and token of each window's loopback server in its bridges/ folder), and on request a UserPromptSubmit hook in ~/.claude/settings.json. Agent Mods: Remove hooks takes them all out.
- Listens, only while the canvas is installed: a loopback HTTP server on
127.0.0.1 per window, which answers only requests carrying that window's random token.
- Sends: only the model calls listed under Model calls, through Copilot or your claude CLI. No telemetry, no other network access.
- Stores: the eta history (the shape of each prompt, never its text) in VS Code's global storage.
How it follows a chat
| Agent |
Transcript it reads |
| Copilot Chat in VS Code |
workspaceStorage/<hash>/GitHub.copilot-chat/transcripts/<session>.jsonl |
| Copilot CLI, Agents window |
~/.copilot/session-state/<session>/events.jsonl |
| Claude Code |
~/.claude/projects/<project>/<session>.jsonl |
It follows whichever of this workspace's sessions moved last. Copilot Chat writes its transcript only while chat hooks are set, and flushes it each time a hook runs. So on first start, Agent Mods offers to add ~/.copilot/hooks/agent-mods.json: hooks that just exit 0 on prompt, tool, sub-agent and stop events, plus the cues as session context. Agent Mods: Set up hooks… installs or removes it later. VS Code's chat.useHooks must stay on (the default).
The model and context used (for the handoff gauge) come from VS Code's own chat storage, chatSessions/<session>.jsonl, which VS Code writes about once a minute.
● working · 63 % context claude CLI
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Week 3 in a row, rest days are free. Resume: Registration filters
[✨✏️] [Refine…] [Write prompt…] [Verify] [Undo] [Handoff → new chat]
┌──────────────────────────────────────────────────┐
│ the export button stopped working on registrations│
└──────────────────────────────────────────────────┘
[1] Run the auth spec alone and paste the first failing line
[2] Should expired tokens return 401 or redirect to /login?
[3] Check that refreshToken is still called on the mobile client
00:07:08 left · tasks 1/3
● Explore documents Read haiku 5.5 00:01:38 left
meanwhile: Review the documents filter PR
Model calls
| When |
Call |
| After every answer (and once for a resumed session, then cached) |
1 writer call for the three next prompts (agentMods.backstage.suggestions turns it off) |
✨✏️, Refine…, Write prompt… |
1 writer call per click |
Verify |
1 scout run; with nothing selected, also 1 writer call to pick the weakest claim |
meanwhile line |
1 scout call per duration range every 30 minutes, only with a .beads/issues.jsonl |
agentMods.backend picks where they go:
vscode-lm: a Copilot model (or any VS Code language model provider), through VS Code's Language Model API. agentMods.models.writer (default opus) and agentMods.models.scout (default haiku) are matched against the model names, so opus picks Copilot's Claude Opus; with no match, a Claude model, otherwise the first one. The scout gets read-only read_file, grep and glob tools confined to the workspace. VS Code asks once to let the extension use Copilot. The view shows the model each call used.
claude-cli: claude -p on your Claude account (--no-session-persistence, no tools for the writer, Read,Grep,Glob only for the scout), with the same model settings as CLI aliases.
auto (default): Copilot when VS Code offers a model, otherwise the CLI.
Turn features on or off
Every feature has its own switch, and every mod a master switch (agentMods.<mod>.enabled) that turns all its features off at once while keeping their own settings. All are on by default.
- The checklist: Agent Mods: Turn features on or off… (or Features… in the Backstage panel) lists every feature; uncheck what you do not want.
- The Settings editor: Agent Mods: Open settings opens the extension's settings, grouped as General, Backstage, Cues, eta-band and Wipe.
settings.json, globally or per workspace (a workspace value wins, and the checklist writes where a switch is already set):
{
"agentMods.backstage.suggestions": false, // no model call after every answer
"agentMods.eta.meanwhile": false,
"agentMods.wipe.enabled": false
}
| Mod |
Switches (agentMods.…) |
| Backstage |
backstage.enabled, backstage.prompts (rewrite, Refine, Write prompt, Undo), backstage.suggestions, backstage.verify (Verify, Refute), backstage.handoff |
| Cues |
cues.enabled, cues.next, cues.startLine, cues.pushSparks, cues.context (the cues in the hooks) |
| eta-band |
eta.enabled, eta.countdown, eta.agents, eta.meanwhile, eta.alert |
| Mirror |
mirror.enabled, mirror.spiral |
| Wipe |
wipe.enabled, wipe.onNewSession, wipe.effect (random or one of the five) |
A feature that is off makes no model call, shows nothing, and its commands leave the Command Palette. Turning cues.context off rewrites the installed Copilot hooks file without the cues.
Settings
| Setting |
Default |
|
agentMods.backend |
auto |
auto (Copilot first), vscode-lm or claude-cli |
agentMods.claudePath |
claude |
Path of the claude CLI |
agentMods.models.writer / .scout |
opus / haiku |
Models for each role |
agentMods.insertMode |
auto |
auto, type (into the composer), chat (open the chat with the prompt) or clipboard |
agentMods.transcriptsDir |
|
Claude Code transcripts folder; empty: $CLAUDE_CONFIG_DIR/projects or ~/.claude/projects |
agentMods.sessionScope |
workspace |
Follow this workspace's latest session (subfolders and worktrees included), or the latest anywhere; Copilot Chat sessions are always this window's |
agentMods.contextWindow |
0 |
Tokens for the handoff gauge; 0: the limit Copilot reports, else 200,000 (1,000,000 for a [1m] model) |
Limits
- The extension reads what the agents write to their transcripts. Copilot Chat writes none without hooks, and Copilot cloud sessions none locally; Agent Mods: Show the followed session says which file it follows.
- The Copilot transcript formats are internal to Copilot and VS Code, read as of VS Code 1.11x and Copilot Chat late 2026; a format change can break the following until the extension is updated.
- Copilot transcripts carry no token counts: the handoff gauge for a Copilot chat lags by up to a minute, the time VS Code takes to write its chat storage.
- Each hook is a process start per prompt, tool call and stop (a few milliseconds).
- Reading and writing the chat input go through focus, select-all, copy and type: a chat that does not take them leaves the prompt on the clipboard instead. The toolbar under the chat input shows icons only, so the countdown and the
next: text stay in the status bar, the view or the canvas.
- Verify reads the selection of the text editor, not of the chat, which VS Code does not expose.
- Older Claude Code versions write no end-of-turn marker: a turn then counts as done 6 s after an answer with no pending tool.
- Copilot reads the cues once per session (
sessionStart); a session started before the hooks were installed has none.
Develop
npm install
npm run build # dist/extension.js and dist/webview.js
npm test # vitest: Claude and Copilot transcripts, chat storage, estimator, cues, backstage, hooks
npm run package # typecheck, test, production build, agent-mods-<version>.vsix
F5 with this folder open starts an Extension Development Host. The estimator, the backstage prompts, the cues logic and the wipe effects are copied from claude-mods unchanged, with their tests.
Release
Versions come from the commits and the branch, GitVersion-style (scripts/version.mjs), and .github/workflows/publish.yml does the rest on every push: it stamps the version, publishes to the VS Code Marketplace through Trusted Publishing (no stored secret) and to Open VSX when the OVSX_PAT secret is set, then creates the tag and the GitHub release with notes grouped from the commits.
| Branch |
Channel |
Version |
main |
release |
feat: → next even minor (0.4.3 → 0.6.0); fix:, perf: or a non-conventional commit → next patch (0.4.0 → 0.4.1); a breaking change (feat!:, BREAKING CHANGE:) → next major from 1.0 |
next |
pre-release |
the odd minor above the latest release: 0.5.0, 0.5.1… (shown to those who pick Switch to Pre-Release Version) |
| others |
none |
CI only |
The Marketplace takes no -beta suffix, hence its convention: even minor for releases, odd minor for pre-releases. Commits that are only docs:, chore:, ci:, test:, build:, style: or refactor: release nothing, nor does a head commit with [skip release]. With no tag yet, the first release is package.json's version. Run workflow on the Publish workflow publishes main's state by hand. npm run package:pre builds a pre-release VSIX locally.
Languages
English and French: VS Code's display language decides (Configure Display Language). Commands, settings, messages, the Backstage panel and the canvas are translated. Prompts sent to models stay in English, which gives the best results; rewrites and suggestions follow the language of your conversation, and the meanwhile line follows VS Code's. The cues keep their Next: keyword, which the extension looks for.
To add a language: npm run l10n refreshes l10n/bundle.l10n.json; translate it as l10n/bundle.l10n.<locale>.json, and package.nls.json as package.nls.<locale>.json. A test checks that every string has its translation with the same placeholders.
License
MIT. Agent Mods is not affiliated with Anthropic, GitHub or Microsoft; Claude, Claude Code, GitHub Copilot and VS Code are their owners' trademarks.