GitKraken CLI

gk ai resolve refine-plan

Re-resolve one planned file with new guidance

Synopsis

Re-resolve exactly one file from an existing plan with new guidance.

Requires exactly one –file and non-empty –instructions. The prior result is replaced and attempt is incremented. This command does not mutate the repo.

Example: gk ai resolve refine-plan /tmp/resolve-plan.json –file src/a.ts
–instructions “preserve the public API” –json gk ai resolve refine-plan /tmp/resolve-plan.json –model \ --file src/a.ts --instructions "preserve the public API" --json

MODEL SELECTION

–model selects a model for this invocation only and does not change saved provider settings. Without it, Resolve uses the active provider's configured model, or the GitKraken backend default when no global override is set.

Run “gk ai provider show” to inspect the active provider and configured model. For GitKraken-hosted AI, “gk ai models” lists available ids and marks the backend default with *. With the GitKraken provider, –model “” bypasses a saved global override once and uses the backend default.

plan, refine-plan, and apply accept –model because they call AI. Repeat the same selection for each refinement or fresh apply when consistency matters. apply-plan replays reviewed bytes without AI and does not accept –model. –fallback-only skips AI, so it cannot be combined with –model; passing both is an error rather than a silently ignored selection. Any model used for Resolve must support tool calling.

gk ai resolve refine-plan <plan> [flags]

Options

      --fallback string       Fallback strategy when AI fails or is unavailable: ours or theirs
      --file stringArray      Exact repository-relative conflicted path to resolve (repeatable)
  -h, --help                  help for refine-plan
      --instructions string   Guidance for AI resolution
      --max-steps int         Maximum model tool-calling steps per file (default 15)
      --model string          AI model id for this invocation (does not change saved settings)
      --plan-file string      Write the complete plan atomically (0600 on POSIX)

Options inherited from parent commands

      --json             Emit machine-readable JSON on stdout (GK_OUTPUT=json sets it session-wide)
      --no-telemetry     Disable telemetry (OTel spans, Sentry) for this invocation
      --session string   (Optional) Isolate auth and cache under a named session
      --workdir string   Path to the git repository to operate on (default: current directory)

SEE ALSO

  • gk ai resolve - Plan, review, and stage AI conflict resolutions
Auto generated by spf13/cobra on 16-Sep-2026

© 2023 Axosoft, LLC DBA GitKraken