Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>Context Management - ACMNew to Visual Studio Code? Get it now.
Context Management - ACM

Context Management - ACM

Harishan-A

|
1 install
| (0) | Free
Agentic Context Management for VSCode — trim, summarise, recall, and remember context for Copilot and Claude Code via a local gateway, Language Model Tools, and a settings panel.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Context Management — ACM

Agentic Context Management (ACM) for VSCode. Keep your AI assistant's context window lean and relevant. ACM brings context-management techniques — trimming, summarisation, image-recall, and persistent memory — directly into the editor, and wires them into GitHub Copilot agent mode and Claude Code.

ACM runs a small local gateway (http://127.0.0.1:8807) that does the actual context work, and the extension exposes it through Language Model Tools, a chat participant, a settings panel, and a live context-window view.


Works with your own API keys and your subscription

ACM is for everyone — it works whether you call models with your own API keys (pay-as-you-go) or through a subscription plan:

  • API method calls — bring your own key (ACM_UPSTREAM_API_KEY / OPENROUTER_API_KEY) and ACM manages the context for every request.
  • Subscription calls — no extra API key is required. ACM works with Claude Code in every IDE it runs in (VSCode, Cursor, Antigravity, Windsurf).

See and control the Claude Code context window

ACM puts you in charge of the context window for Claude Code Pro, Max, and API usage:

  • See the entire context window used for every call — the Context Window view shows a live, per-call breakdown of exactly what's in the window and how many tokens it costs.
  • Apply context-management techniques per purpose — trim, summarise/compact, drop messages, recall memory, and switch profiles (minimal, long_chat, power_research, cheap_long, visual_recall) to shape the window for whatever you're doing.
  • Control Pro / Max plans the same as API — because Claude Code is routed through the local gateway, the same context controls apply to subscription plans, not just metered API calls.

Features

  • Language Model Tools — acm_remember, acm_recall, acm_compact, and acm_set_profile, callable from Copilot agent mode and referenceable in chat (e.g. #acmRecall).
  • Persistent memory — remember decisions, file paths, and open tasks across sessions, scoped per-user or per-thread.
  • Context window view — a live HUD of the current conversation's context-token usage, with manual drop-list editing.
  • @acm chat participant — @acm status, @acm recall <query> straight from the chat panel.
  • Settings panel — a React UI (sidebar + editor panel) for presets, per-technique config, providers, and memory.
  • Claude Code routing — optionally point Claude Code at the gateway by managing ANTHROPIC_BASE_URL; your own OAuth token is forwarded, so a Claude subscription needs no extra API key.
  • Selectable profiles — minimal, long_chat, power_research, cheap_long, visual_recall.

Requirements

Nothing to install by hand. The extension talks to the acm-gateway, a small local service. On first activation, if the gateway isn't already present, the extension installs it automatically (fetching uv first if needed) and then starts and supervises it for you — you'll see a one-time "setting up the context-management gateway…" notification. It also adopts an already-running gateway on the configured URL instead of spawning a duplicate.

The only external requirement is network access on that first run (to download the gateway). After that it runs fully locally.

GET /status and GET /profile work with no credentials. To make model calls with your own API key, set an upstream key — subscription routing (Claude Pro/Max) needs no key:

export ACM_UPSTREAM_API_KEY=...   # or OPENROUTER_API_KEY (default upstream is OpenRouter)

Prefer to manage it yourself? Set acm.manageGateway to false and run your own gateway, or point acm.gatewayCommand at a custom launch command.


Getting started

  1. Install the extension from the Marketplace.
  2. Open the ACM view from the activity bar — the gateway sets itself up on first launch.
  3. In Copilot agent mode, the ACM tools are available automatically; reference them in chat with #acmRemember, #acmRecall, etc.
  4. (Optional) Run ACM: Monitor Claude Code (route through gateway) to route Claude Code through the gateway.

Commands

Command Description
ACM: Open Context-Management Settings Open the settings webview
ACM: Show Context Window Open the live context-window view
ACM: Show Gateway Status Display gateway health
ACM: Recall Memory Recall stored facts
ACM: Monitor Claude Code (route through gateway) Route Claude Code via the gateway
ACM: Stop Monitoring Claude Code (restore routing) Restore Claude Code's routing
ACM: Restart Gateway Restart the managed gateway

Settings

Setting Default Description
acm.gatewayUrl http://127.0.0.1:8807 Base URL of the local acm-gateway
acm.memoryScope user Default scope (user / thread) for ACM memory tools
acm.manageGateway true Start and supervise the gateway process automatically
acm.gatewayCommand acm-gateway Command used to launch the gateway when acm.manageGateway is on
acm.routeClaudeCode true Point Claude Code at the gateway by managing ANTHROPIC_BASE_URL
acm.routeScope user Where to manage ANTHROPIC_BASE_URL (user = ~/.claude/settings.json, project = workspace .claude/settings.local.json)

Other IDEs

The extension is also published to Open VSX, so it installs in Cursor, Antigravity, and Windsurf. For IDEs that allow a custom endpoint, point them at http://127.0.0.1:8807/v1 for full-parity context editing.


Links

  • Repository: https://github.com/HarishanA21/agentic_context_management
  • Issues: https://github.com/HarishanA21/agentic_context_management/issues

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft