Skip to content

Exercise --steer against a running Gemini CLI #151

Description

@Chirag6722

--steer on a Gemini CLI session is derived from the source (google-gemini/gemini-cli: docs/hooks/reference.md, packages/core/src/core/client.ts, hooks/types.ts) and validated against a fixture. Nobody has run it against a real Gemini CLI yet, and the README says so. This issue is that run — no code unless something disagrees.

What agit claims (src/steer.ts header, README "--steer")

  • AfterAgent: a blocking decision whose reason is sent to the agent as the next prompt, history kept — the "agent just finished" case.
  • BeforeAgent: hookSpecificOutput.additionalContext appended to the prompt for that turn — the idle case.
  • The hook's session_id is the recording's own session id, which is what the adapter reports and what the steer inbox is keyed by.

Steps

  1. npm install -g agitsh; in one terminal agit relay.
  2. In a project, agit hook --config gemini-cli and add the fragment to Gemini CLI's settings (agit must be on PATH).
  3. Start a Gemini CLI session; find its recording under ~/.gemini/tmp/<project>/chats/session-*.jsonl.
  4. agit share <that file> --steer — copy the link and the steer key.
  5. From another terminal, agit steer <link> "<message>" --steer-key <key> (or type it on the share page with the key), once while the agent is idle and once while it is mid-turn.

Report

  • Gemini CLI version.
  • Idle case: did the message ride along with your next prompt? Finished case: did the agent continue with the message as its next prompt, with history kept?
  • What the agent said it did (it is asked to say), and whether the delivered text matched what agit hook prints for the same event.
  • Anything surprising: an escaped character, a message delivered twice, a hook timeout.

If reality disagrees, the fix goes in src/steer.ts (and the README paragraph), with a test in test/steer.test.ts. Sanitize anything you paste — a recording holds whatever the agent saw — and never attach a raw one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions