plandex-ai/plandex · error
no commitMsg tag found in XML response
Error message
no commitMsg tag found in XML response
What it means
When the CommitMsg model is configured with XML preferred output format, genPlanDescription extracts the commit message from a <commitMsg> tag in the model's reply via utils.GetXMLContent. If the model's response lacks that tag (or it's empty), the server treats it as an invalid response and returns a 500 ApiError.
Source
Thrown at app/server/model/plan/commit_msg.go:132
go notify.NotifyErr(notify.SeverityError, fmt.Errorf("error during plan description model call: %v", err))
return nil, &shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusInternalServerError,
Msg: fmt.Sprintf("error during plan description model call: %v", err),
}
}
log.Println("Plan description model call complete")
content := modelRes.Content
var commitMsg string
if baseModelConfig.PreferredOutputFormat == shared.ModelOutputFormatXml {
commitMsg = utils.GetXMLContent(content, "commitMsg")
if commitMsg == "" {
go notify.NotifyErr(notify.SeverityError, fmt.Errorf("no commitMsg tag found in XML response"))
return nil, &shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusInternalServerError,
Msg: "No commitMsg tag found in XML response",
}
}
} else {
if content == "" {
fmt.Println("no describePlan function call found in response")
go notify.NotifyErr(notify.SeverityError, fmt.Errorf("no describePlan function call found in response"))
return nil, &shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusInternalServerError,
Msg: "No describePlan function call found in response. The model failed to generate a valid response.",View on GitHub (pinned to e2d772072e)
Solutions
- Switch the CommitMsg model config to the plain (function-call/JSON) output format instead of XML
- Use a stronger instruction-following model for commit messages
- Increase max_tokens so the response isn't truncated before the closing tag
- Re-run — LLM output is non-deterministic, a retry often produces the tag
Example fix
// before: XML format on a weak local model
"CommitMsg": {"PreferredOutputFormat": "xml", "ModelName": "tiny-7b"}
// after: let the model use tool-call format
"CommitMsg": {"PreferredOutputFormat": "default", "ModelName": "gpt-4o-mini"} Defensive patterns
Strategy: validation
Validate before calling
// check the model's raw output before relying on it
msg := utils.GetXMLContent(content, "commitMsg")
if msg == "" {
log.Printf("model did not emit commitMsg tag; raw: %.200s", content)
} Try / catch
desc, apiErr := genPlanDescription(...)
if apiErr != nil && strings.Contains(apiErr.Msg, "commitMsg tag") {
// fallback: synthesize a commit message locally or retry once
return fallbackCommitMsg(planId), nil
} Prevention
- Only enable XML output format for models proven to follow it
- Use a strong instruction-following model for CommitMsg
- Raise max_tokens to avoid truncation before the closing tag
- Log raw model output to diagnose format drift quickly
When it happens
Trigger: The model configured for commit messages ignores the SysDescribeXml prompt and replies in free text, Markdown, or a different tag name; the response was truncated by a low max_tokens setting; a weaker/quantized local model fails to follow the XML format.
Common situations: Custom model packs pointing at small local models (Ollama/llama.cpp) that don't reliably emit XML; switching PreferredOutputFormat to xml on a model that isn't instruction-tuned for it; temperature/top_p settings making format adherence erratic.
Related errors
- No name tag found in XML response
- error unmarshalling plan description response: %v
- execStatusShouldContinue: missing required XML tags in respo
- client not found for provider composite: %s
- error creating chat completion stream: %w
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/f580f5db620586ae.
Report an issue: GitHub.