Skip to content

feat: Grok over grok agent stdio - #35

Merged
pathscale merged 4 commits into
masterfrom
feat/grok-headless
Sep 16, 2026
Merged

pathscale merged 4 commits into
masterfrom
feat/grok-headless

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Adds Agent::Grok as a fourth backend. Transport is grok agent stdio (ACP JSON-RPC). No new crates.

What this does

  • One child per stream(), so many Grok sessions and other backends can run in parallel
  • Mid-turn input: _x.ai/interject (same turn; does not queue or cancel)
  • Interrupt: session/cancel (kicks the in-flight turn; session stays, resume can reattach)
  • Auto: native --permission-mode auto, not --always-approve
  • /compact → _x.ai/compact_conversation; /clear refused (Grok has /new)

What this does not

  • No TOON on the ACP wire
  • No PromptSyntax
  • No nagoya migration
  • No Codex 0.154 flag/model refresh (installed Codex is newer than the crate's 0.147 mapping; that is a separate PR)

Verified against grok 1.0.30 --help and live ACP method names. cargo test --lib: 216 passed. Live grok agent stdio smoke is still outstanding.

meh added 3 commits September 13, 2026 20:57
Fourth agent, ACP JSON-RPC, no new crates. Steer is _x.ai/interject.
Interrupt is session/cancel. Auto is native permission-mode auto.
/compact maps; /clear is refused.
The ACP transport has no TUI, so `enter_plan_mode` and `exit_plan_mode`
hang until the host's liveness ping aborts the turn (session 01a09bd5).
Pass `--no-plan` so the model writes plans as ordinary assistant text.

Also carries `used_percent` on `RateLimit`: Grok reports weekly window
fill through `x.ai/session/usage`, which Claude's in-run rate limit
object does not have. Defaulted to None everywhere else, so no provider
changes shape.
CI runs `cargo clippy --all-targets -- -D warnings`, which the new ACP
module did not pass: numeric separators, `map(..).unwrap_or(..)` on a
Result, the bool count on `Protocol`, and the JSON number casts.

The casts are allowed rather than rewritten. Token counts and tick
values are whole and far below 2^53, and the one narrowing cast is
already guarded non-negative.
@pathscale
pathscale merged commit abc7e18 into master Sep 16, 2026
1 check passed
@pathscale
pathscale deleted the feat/grok-headless branch September 16, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant