oliver-zehentleitner / maity

runner: OpenCode as a harness with the owner's xAI subscription (Grok on the runner) — spike first

Sign in to report

tsk-sn90s6wzp9s7 Done An agent

Oliver's wish (2026-11-15): a Grok agent as a CLI harness on the runner, through OpenCode signed in with the owner's xAI subscription (no API key). The lead's research of the same day: since OpenCode v1.15.7 (2026-05-21), OpenCode has an official xAI sign-in with a subscription, including a device-code login for headless machines (announced by xAI, x.ai/news/grok-opencode). OpenCode runs headless with opencode run or opencode serve.

Order

After #1805 (tool install) and the agy harness (tsk-e062xzrgfxxc, tsk-vgce05kdmk2x).

Steps

  1. Spike on vm-aigents01 (ur6p): install OpenCode for the runner user. Oliver does the xAI sign-in himself (device code); no agent handles his credentials. Check that a headless run works with the subscription: which models, any 403/429 refusals, rough limits over a few hours of agent-like use. Report to the lead before any code.
  2. Contract: OpenCode as a harness in docs/api.md §15 (harness list, tools, sandbox story, how a placement starts it, login_needed), plus docs/runners.md.
  3. Runner: adapter, start/resume, sandbox (the same rules as the other harnesses: maity outside the sandbox only by exact grant), tool install/update through the #1805 mechanism with checked vendor releases.
  4. Web: the harness in the placement form and the agent's harness label.

Rules

  • Product names of our own plans and prices stay out of repo and cards.
  • Security: the sandbox check is the same depth as for agy (static read of the permission matcher before trusting it). Findings by DM to the lead and the security lead.
  • If the subscription proves unstable for agents (limits, refusals), stop after the spike and report.

Notes

  1. An agent · Nov 15, 2026, 18:16 UTC

    Spike checklist (step 1, vm-aigents01)

    Goal: decide whether OpenCode with the owner's xAI sign-in holds up for agent work. No code before the lead's go.

    Setup (runner user, no sudo)

    1. Install OpenCode at a fixed version (>= 1.15.7) from the vendor's own release. Note the version, how it is installed, and whether a checksum or signature is published (we need that for the #1805 installer).
    2. Oliver signs in himself (device code). The agent never sees the code, a token or a credential file. Only note where OpenCode keeps its login (path, mode), never its content.
    3. opencode --version, plus its exit code without a login. Is there a login-status command with exit 0/1, for the runner's login_needed?

    Headless runs

    1. opencode run "<small task>" in a scratch clone: does it run without a TTY? Exit code on success, on refusal, and on an expired login.
    2. opencode serve: does it need a port? Does it bind to 127.0.0.1 only?
    3. Models offered with the subscription: list them, and which one is the default.
    4. Session resume: can a run continue an earlier session (id/flag)?

    Permissions and sandbox (input for the security read)

    1. How are tool/command permissions configured (config file, keys)? Is matching exact or by prefix? Is there a hook before a command runs?
    2. Does OpenCode have its own OS sandbox? If not, the runner rules say what is allowed (same depth as agy).
    3. Does it update itself? Can that be switched off (#1805: the runner manages the version)?

    Stability (a few hours of agent-like use)

    1. Run 20-50 tasks spread over 2-4 h (read code, small edits, run tests). Count: successes, 403, 429, other errors, with time and message text (no tokens).
    2. On a 429: how long until it works again? Is there a header or text with a reset time?
    3. Rough throughput: tokens or requests per hour before the first limit, if visible.

    Report to the lead

    • Versions, install path, login place, status command
    • Headless yes/no, resume yes/no, models
    • Permission model + sandbox (for the security read, by DM)
    • Error counts and limits; the verdict "stable enough" or "stop"

    Stop and report right away if refusals or limits make normal agent use impossible.