Skip to content

Improve Agent "Self-Awareness": Accurate CLI Flags, Hotkeys, and Self-Execution #21432

Description

@LyalinDotCom

What would you like to be added?

Objective

Ensure the Gemini CLI understands its own mechanics well enough to act as its own expert guide. The agent must be able to provide users with accurate facts about how it works, its hotkeys, and the exact CLI flags needed to run itself for specific workflows.

The Problem

Users rely on the CLI to learn how to use the CLI. If the agent hallucinates flags (like suggesting the deprecated --yolo instead of --approval-mode=yolo) or forgets UI hotkeys (like Double Esc for /rewind), it blocks progress and creates friction. The agent needs strict grounding in its own documentation to accurately guide users.

Why is this needed?

  1. Accurate Internal Facts: The agent (specifically the cli_help subagent) must have flawless recall of its own UI keyboard shortcuts, slash commands, and settings hierarchy.
  2. Flag Construction: It must be able to tell users exactly how to run it from the terminal for various use cases (e.g., suggesting gemini -i "prompt" --sandbox --output-format json for safe, headless scripting).
  3. Self-Execution & Guidance: It should be able to write the exact commands needed to run itself, restart itself, or execute sub-tasks with the correct environment variables and flags.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitykind/customer-issueIssues that were reported by customerspriority/p3Backlog - a good idea but not currently a priority.status/bot-triagedstatus/possible-duplicateworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions