Skip to content

parsemend fix

bash
parsemend fix postlyra-12

One command that runs the whole pipeline in your working copy: fetch the context bundle, work out the root cause, turn that into a plan, then write the code. Every step runs locally against models you pay for directly.

This is the path for when there is no agent session to drive — a scripted run, a terminal with nothing else open, a machine where you want one command rather than a conversation. If you already work in Claude Code or Codex, the MCP server is the better trade: your session's model, your session's tools, and no provider key of your own.

Naming the issue

fix takes what parsemend issues prints, a numeric id, or a full issue URL:

bash
parsemend fix postlyra-12
parsemend fix 4127
parsemend fix https://app.parsemend.com/issues/4127

Anything else is refused before the request goes out, so a typo costs nothing.

The steps

StepWhat it produces
root_causeA reproduction timeline: how the failure actually happens, walked through the real checkout.
planA solution plan built from that timeline. Opens in $EDITOR for review unless you pass --no-edit.
codingThe change set, written into your working copy.

Stop early with --stop-at root_cause, --stop-at plan, or --stop-at coding.

Run state is written to .parsemend/run-<id>.json after every step, so a run interrupted at the plan resumes from the plan rather than starting over. Add .parsemend/ to .gitignore. If the agent has already produced output for this issue in the cloud, a fresh run offers to reuse it instead of re-deriving it.

Your working copy is the workspace

There is no isolated per-run directory to throw away. fix edits the files you have open, which makes git diff and git checkout -- . your undo button — and only works if the tree was clean to begin with. The coding step refuses to write into a dirty tree without --force.

--dry-run shows the proposed change set without writing anything. It applies to the default executor only.

Models and keys

Four roles, each resolved from a flag, then a PARSEMEND_MODEL_<ROLE> environment variable, then a built-in default:

RoleFlagDefault
explore--model-exploreanthropic:claude-haiku-4-5
conclude--model-concludeanthropic:claude-sonnet-5
code--model-codeanthropic:claude-sonnet-5
formatanthropic:claude-haiku-4-5

--model <spec> sets every role at once. A spec is always provider:model; a bare model name is an error rather than a guess. Supported providers are anthropic, openai, google, and ollama (served through its OpenAI-compatible endpoint on localhost:11434).

Keys come from the standard environment variable for the provider — ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY. The CLI will also read a providerApiKeys map out of ~/.parsemend/config.json if you put one there, but no command writes that map for you, so the environment variable is the path that exists today.

Handing the coding step to Claude Code

bash
parsemend fix postlyra-12 --executor claude_code --model-code anthropic:claude-opus-5

Instead of the built-in tool loop, this shells out to your local claude binary (or CLAUDE_CODE_BINARY) with --permission-mode acceptEdits — it applies its own edits without asking. The anthropic: prefix is dropped on the way through, since claude --model takes claude-opus-5 or opus. Naming any other provider is an error rather than a silent fallback. Left unset, Claude Code keeps whatever model you configured for it.

Publishing

Nothing is sent to Parsemend unless you ask:

bash
parsemend fix postlyra-12 --post-back

Or, after the fact, for a run that already happened in this directory:

bash
parsemend post-back postlyra-12

The run appears on the issue under AI Agent → Fix runs. As with the MCP server, the diff is read from the working tree — publish before you commit.

The CLI never opens a pull request. That is the agent's job, and only the agent does it.

All flags

FlagEffect
--executor <name>tool_loop (default) or claude_code.
--model <spec>Every role, unless a per-role flag overrides it.
--model-explore, --model-conclude, --model-codePer-role override.
--stop-at <step>root_cause, plan, or coding.
--dry-runShow the change set without writing files. Default executor only.
--forceProceed into coding with a dirty working tree.
--no-editSkip the $EDITOR plan review.
-y, --yesSkip all confirmations.
--post-backPublish the run when it finishes.

The catch

The coding step cannot ask you anything. It runs as a one-shot subprocess against a plan that was fixed the moment it started, so a plan that is subtly wrong is carried out anyway, and you find out by reading the diff. --stop-at plan and the $EDITOR review are the two places to catch it — and the MCP server exists precisely because a session you can interrupt is a better place to fix a hard bug than a pipeline you cannot.

Parsemend, by MAVA Design