Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support autocomplete/ghost text for extension slash command arguments

Open
#1,219 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet

Research direction

Start with the generated/types documentation for CommandDefinition and the extension registration shown through joinSession({ commands: [...] }). Trace how project-scoped extension commands are handled in the Copilot CLI. Done should provide a documented SDK surface for static usage or structured suggestions and dynamic argument completion, with descriptions where supported.

Written by the indexing model from the issue text.

Description

enhancement

Summary

Please add an SDK/API surface that lets Copilot CLI extensions provide autocomplete, ghost text, or structured argument suggestions for extension slash commands.

Scenario

I am building a Copilot CLI extension that registers a deterministic /cost command via joinSession({ commands: [...] }). The command has useful subcommands/options such as:

/cost
/cost help
/cost panel on|off|refresh
/cost session <session-id>
/cost live-session <session-id>
/cost --plan pro|pro-plus|business|enterprise
/cost --billing-model usage-based|premium-requests
/cost --currency USD

Built-in slash commands appear to show ghost text / inline hints for supported arguments as the user types. For extension commands, I only see the command name/description; after typing /cost there does not appear to be a way to suggest supported subcommands/options.

Current SDK surface

The generated/types docs I found for CommandDefinition only expose:

export interface CommandDefinition {
  name: string;
  description?: string;
  handler: CommandHandler;
}

That is enough to register /cost, but not enough to provide argument completions, examples, or dynamic suggestions.

Requested capability

It would be useful if extension commands could declare one or more of the following:

  • static usage text/examples for ghost text after the command name
  • structured subcommands/options/enum values
  • dynamic completion callback based on the current argument prefix and session context
  • optional descriptions for each subcommand/option

For example, something like:

commands: [
  {
    name: 'cost',
    description: 'Show Copilot session cost.',
    usage: 'panel on|off|refresh | session <session-id> | --plan <plan>',
    completions: async ({ args, cursor, sessionId }) => [
      { value: 'panel', description: 'Open or manage the cost panel' },
      { value: 'session', description: 'Show cost for a completed session' },
      { value: '--plan', description: 'Compare against a subscription plan' }
    ],
    handler
  }
]

Why this matters

Extension slash commands can be deterministic command surfaces rather than model-routed prompts. Without argument hints, users have to remember command syntax or run a separate help command. Built-in-command-quality discoverability would make SDK extensions feel native and easier to learn.

Workaround today

The extension can implement /cost help, but that is less discoverable and does not help while typing.

Environment

Observed with Copilot CLI / SDK builds around 1.0.41-0 / 1.0.43 on Windows while authoring a project-scoped extension under .github/extensions/<name>/extension.mjs.

Dominant language
Java
Stars
10.5k
Forks
1.5k
Avg merge
1d 9h
Merged PRs (30d)
130

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 github/copilot-sdk

All issues in github/copilot-sdk

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.