Skip to content

runImport calls a grok subcommand that no longer exists; /grok-build:import cannot work #21

Description

@kai-wedekind

runImport at plugins/grok-build/scripts/lib/grok.mjs:279-281 builds ["import", <path>, "--json"], called from executeTransfer and surfaced to users as /grok-build:import. The Grok CLI has no import subcommand.

Verification

grok import --help returns byte-identical top-level help, whereas a real subcommand behaves differently — grok sessions --help returns its own usage block. Running the real argv gives exit 2, error: unexpected argument '….jsonl' found.

It is not a 1.0.0 regression

Checked against three binaries on disk: grok 0.1.219 (2026-05-26) still had it; 0.2.118 already did not (exit 2, "unrecognized subcommand"); 1.0.0 does not. So it has been broken for considerably longer than the recent major bump, and pinning an older CLI does not help.

Why nobody noticed

tests/fake-grok-fixture.mjs implements argv[0] === "import" and returns a fake UUID, so the hermetic tests pass regardless of what the real CLI supports.

There is no replacement, which I checked before filing

I went looking for something to repoint it at, and there is nothing:

  • All 24 files of the shipped user guide describe session continuity as native resume only. No import, seed, or migrate path from an external transcript.
  • grok sessions offers list, search, delete — no create or restore-from-file. Its --help is byte-identical between 0.2.118 and 1.0.0.
  • export and trace are outbound only. memory only clears. --session-id creates a new empty session and is explicitly documented as no longer supporting the old upsert behaviour.
  • /import-claude in the TUI imports Claude settings — permissions, env, MCP servers, hooks, paths — not conversation.
  • Hand-writing ~/.grok/sessions/ is not a supportable route: resume is driven by updates.jsonl while model continuity needs a consistent chat_history.jsonl, reasoning entries carry opaque encrypted_content, and the format has no published schema.

The nearest official equivalent is Grok's own bundled resume-claude skill, which reads a foreign transcript and produces a handoff summary into a fresh session, with the explicit rule "Never replay the transcript verbatim into the new model context." That looks like a deliberate design choice rather than an oversight.

One sharp edge worth closing either way

runImport's options.json !== false branch means a caller passing json: false produces a bare ["import"] argv. An unknown subcommand is absorbed by the CLI as the [PROMPT] positional, so that argv launches a full interactive session with import as the prompt — which reads files and consumes a metered turn. No current caller does this, but it is one boolean away.

I am removing the command in my downstream fork rather than shimming it, since there is nothing to rebuild it on. Flagging it here in case you would rather do something else with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions