[
    {
        "role": "user",
        "content": "when%20i%20use%20copilot%20suggest%20from%20copilot%20cli%2C%20it%20says%20invalid%20format.%20perhaps%20suggest%20is%20no%20longer%20a%20valid%20copilot%20cli%20command%3F"
    },
    {
        "role": "assistant",
        "content": "It sounds like you're running into this error because GitHub recently updated how Copilot works in the CLI \u2014 the command you\u2019re using (with `suggest`) is likely the old syntax. I can walk you through what changed and how to use the new version correctly.\n\n---\n\n## What changed\n\n- GitHub has **integrated Copilot CLI natively into the GitHub CLI** (`gh`) in early 2026, which means the old Copilot extension (`gh-copilot`) has been deprecated. ([blockchain.news](https://blockchain.news/news/github-copilot-cli-native-integration-january-2026?utm_source=openai))  \n- The new commands use `gh copilot ...` instead of whatever older syntax was used. ([blockchain.news](https://blockchain.news/news/github-copilot-cli-native-integration-january-2026?utm_source=openai))  \n- The Copilot CLI itself (the agent mode) is also available in non-`gh` form via `copilot ...`, especially when doing more interactive or agentic tasks. ([datacamp.com](https://www.datacamp.com/tutorial/github-copilot-cli-tutorial?utm_source=openai))\n\n---\n\n## Why you're seeing \u201cinvalid format\u201d\n\n- If you're using `copilot suggest` directly instead of `gh copilot suggest`, the CLI won\u2019t recognize it \u2014 that command has likely changed.  \n- If you're trying something like `copilot suggest \u201cundo last commit\u201d`, that syntax may no longer be accepted under the new structure. The system expects `gh copilot suggest \"...\"` or the appropriate flags. ([docs.github.com](https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line?utm_source=openai))\n\n---\n\n## How to fix it: current working usages\n\nHere\u2019s how to correctly use Copilot suggestions now:\n\n### Using GitHub CLI\n\n```bash\ngh copilot suggest \"description of what you want\"\n```\n\nExample:\n\n```bash\ngh copilot suggest \"Undo the last commit\"\n```\n\nThis enters an interactive session to refine the prompt if needed. ([docs.github.com](https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line?utm_source=openai))\n\nYou can also use flags, like specifying the type (`-t`) e.g. `-t shell` to output a shell command. ([gist.github.com](https://gist.github.com/kaangiray26/c18c8d7c644d0bf6b06c8fe58e794f17?utm_source=openai))\n\n### Using the standalone agent-style CLI (`copilot`)\n\nIf for some reason you're using `copilot` directly (outside `gh copilot`), you usually use a prompt flag `-p` or `--prompt`. Example:\n\n```bash\ncopilot -p \"generate README for this repo with install and usage sections\"\n```\n\nIf you try to use a dedicated command like `review` without the correct format, you\u2019ll get \"invalid format.\" In that case you need:\n\n```bash\ncopilot --allow-all --model gpt-5.2-codex -p \"review git changes, do not build or run unit tests, only check the code\"\n```\n\nNot:\n\n```bash\ncopilot review --allow-all --model gpt-5.2-codex -p \"review git changes...\"  # \u2190 this produces \u201cinvalid format\u201d ([reddit.com](https://www.reddit.com/r/GithubCopilot/comments/1qz6pu7/can_i_run_review_command_in_the_noninteractiveci/?utm_source=openai))\n```\n\n([reddit.com](https://www.reddit.com/r/GithubCopilot/comments/1qz6pu7/can_i_run_review_command_in_the_noninteractiveci/?utm_source=openai))\n\n---\n\nIf you tell me exactly which command you ran and what version of `gh` or `copilot-cli` you\u2019re using, I can help you adjust it to work properly."
    }
]