Add /chronicle command set to Agent Host

Open
#320,640 0 comments 0 reactions 2 assignees View on GitHub

@vijayupadya is already working on this.

Since Jun 9, 2026.

Assessment

This issue has not been assessed yet.

Description

agent-host agent-host-protocol chronicle feature-request

Summary

Add the /chronicle command family (standup, search, tips, cost-tips, improve, reindex) to the Agent Host so users can invoke session history insights directly from VS Code chat.

Motivation

The /chronicle commands provide powerful session history analysis (standup reports, usage tips, cost optimization, workflow improvements) via the session_store_sql tool. These are currently available through the CLI but not surfaced in VS Code's Agent Host. Users should be able to access these from the same chat surface where they do their work.

Subcommands

Subcommand Behavior Description
standup agent-prompt Get a report on your work from the last day
search <query> agent-prompt Search all session content by keyword or topic
tips agent-prompt Get personalized tips based on usage patterns
cost-tips agent-prompt Get tips to reduce token usage and cost
improve agent-prompt Suggest improvements to copilot-instructions.md
reindex local (no model) Rebuild the session store index

Implementation Plan

Phase 1: Completion Provider (discoverability)
  1. Extend CopilotSlashCommandName in copilotSlashCommandCompletionProvider.ts — add 'chronicle' to the type union, COMMANDS array, and getCommandDescription(). Insert text should be /chronicle (trailing space to prompt subcommand entry).

  2. Add chronicle subcommand completions — detect /chronicle prefix and offer sub-completions for the 6 subcommands. Either extend the existing provider or create a dedicated provider.

  3. Update parseLeadingSlashCommand() regex to recognize /chronicle followed by optional subcommand + remaining text.

Phase 2: Command Execution (send handler)
  1. Add chronicle dispatch in CopilotAgentSession.send() — parse subcommand from slashCommand.rest, build the agent prompt, inject as message text. For reindex: complete turn locally (like /compact).

  2. Create chroniclePrompts.ts — new file at src/vs/platform/agentHost/node/copilot/chroniclePrompts.ts with prompt builders for each subcommand (standup, search, tips, cost-tips, improve). Each prompt instructs the model to use session_store_sql with the appropriate schema.

Phase 3: Tool & Store Availability
  1. Ensure session_store_sql is available — verify the tool is registered for agent host sessions when chronicle prompts are injected. The tool needs access to the session store (cloud DuckDB or local SQLite).
Phase 4: Feature Gating
  1. Add config/feature flag — gate behind a config key (similar to AgentHostConfigKey.RubberDuck). Hide from completions when disabled or when no session store is available.

Relevant Files

  • src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts — command list, type, regex
  • src/vs/platform/agentHost/node/copilot/copilotAgentSession.tssend() dispatch
  • src/vs/platform/agentHost/node/copilot/chroniclePrompts.tsnew, prompt builders
  • src/vs/platform/agentHost/node/copilot/copilotAgent.ts — provider registration
  • extensions/copilot/src/extension/tools/common/toolNames.ts — already has SessionStoreSql
  • extensions/copilot/src/extension/chronicle/vscode-node/sessionStoreTracker.ts — session store writer (reference)

Design Decisions

  • Prompt injection pattern: Same approach as /plan, /research, /rubber-duck — rewrite prompt text in send() before forwarding to the SDK.
  • Cloud vs. local store: Target cloud session store (DuckDB syntax) since the agent host is connected to GitHub. Fall back to local SQLite if cloud is unavailable.
  • Subcommand completion UX: Space-separated form (/chronicle standup) matching existing parser behavior.
  • reindex handling: Complete turn locally (like /compact) since it's a side-effect, not a model interaction.
  • /chronicle search without query: Return inline help text rather than invoking the model.

Verification

  1. Type / → chronicle appears in completion list with description
  2. Type /chronicle → subcommand completions appear
  3. Submit /chronicle standup → model receives prompt and uses session_store_sql
  4. Submit /chronicle reindex → completes locally without model
  5. Feature flag off → command hidden from completions and rejected in send
  6. Unit tests for command parsing and prompt generation
Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.