Diagnostics and recovery

Turn symptoms into checks, fixes, and durable evidence.

Good troubleshooting in MARS starts by preserving the repo, reading the actionable error, checking the owning surface, and recording evidence before retrying. This guide collects the common user-facing failure paths and the safest recovery commands. For ownership and cleanup questions, use the Files And State Reference.

Triage Loop

  1. Stop making the state worse

    Pause the worker pool before broad inspection if autonomous work is still running.

    Press p in the terminal or use authenticated dashboard Pause.

  2. Capture the current state

    Save the exact command, repo path, database path, log path, role, trace ID, and visible error.

    git status --short --branch
    mars doctor --repo /path/to/repo --json
  3. Use the smallest relevant check

    Prefer doctor, dry run, targeted tests, or dashboard status before rerunning the full autonomous loop.

  4. Classify ownership

    Decide whether the failure belongs to MARS foundation behavior, the deployed target repo, mixed configuration, or missing evidence.

  5. Retry only after the fix is real

    Do not repeat the same failed queue job unchanged unless the blocker was external and has changed.

Install And PATH

SymptomCheckRecovery
mars command not foundcommand -v marsRun mars path setup from a known installed binary, or rerun make install from the source checkout and open a new shell. See the Shell Integration Reference.
Old behavior after rebuildmars version and which marsUse make install; avoid go build ./cmd/mars; ./mars ... because a failed build can run an old source-root binary.
Shell profile not updatedmars path setup --dry-run --jsonRun mars path setup --shell zsh or the detected shell option, then restart the terminal. Use Shell Integration for shell-specific profile and completion fixes.
Source checkout cannot updategit status --short --branchCommit, stash, or deliberately handle local changes before make update-tool.

Setup And Models

SymptomLikely causeRecovery
Setup fails during model downloadNetwork, disk, checksum, or ineligible hardware profile.Run mars doctor --json, then retry mars setup --download --local-bundle auto.
No eligible local bundleHardware detection cannot prove enough RAM, VRAM, disk, OS, or backend support.Use cloud/deferred routing or choose a smaller eligible bundle after mars models eligible --json.
Local generation is very slowLarge quantization, memory pressure, or CPU fallback.Choose a smaller local bundle, use a balanced profile, or point to a real OpenAI-compatible endpoint with --model-endpoint.
Cloud provider auth failsThe configured api_key_env is not present in the process environment.Export the named variable or write ignored local env with mars models credentials write-local-env. See the Authentication And Credentials Reference.
Ollama override failsOllama model is not installed or endpoint is not reachable.Run mars models list --provider ollama and evaluate the candidate before using it.
mars models eligible --json
mars models list --provider ollama
mars models evaluate --provider ollama --model qwen3.6:27b
mars models override --repo /path/to/repo --tier coding --provider ollama --model qwen3.6:27b

Harness And Config

SymptomCheckRecovery
Missing .harness/manifest.yamlls .harnessRun mars init --repo /path/to/repo. For inspection only, use mars run engineer --repo /path/to/repo --dry-run --no-init.
Invalid manifest YAMLmars doctor --repo /path/to/repoFix YAML syntax, required name, required role prompt, and valid orchestration_mode.
Role registry driftdocs/roles/ROLES.md versus manifest.Update registry rows for custom roles and rerun mars doctor --repo /path/to/repo.
Upgrade does not change an existing promptExpected preservation behavior.Initialize a temporary repo with the new binary and manually copy wanted default prompt changes.
Need to remove MARSPreview first.mars eject --repo /path/to/repo, then mars eject --repo /path/to/repo --apply --confirm repo-name.

Agent Runs

SymptomFirst checkRecovery
Role cannot runManifest role key, prompt file, tool list, trust, and model route.mars run engineer --repo /path/to/repo --dry-run, then fix the manifest or prompt path.
Role has no toolsStrict tool allowlist is empty or missing.Add only the required tools in .harness/manifest.yaml.
Role loops or hits max turnsTrace summary, terminal phase, and ticket state.Inspect trace evidence and add a skill, clearer stop condition, smaller ticket, or better context route before retrying.
Role completes without useful workNo-op outcome or stale ticket state.Route to Janitor or update the ticket/plan so the next role has a concrete action.
Tool is blockedTrust level, guardrail message, and allowlist.Prefer changing the implementation or policy narrowly over bypassing the guardrail.
Worktree dirty after a rungit status --shortReview changes, validate, and commit or deliberately revert target-owned throwaway output.
mars run engineer --repo /path/to/repo --dry-run
mars run engineer --repo /path/to/repo --debug
mars trust --repo /path/to/repo
mars tools list --json

Dashboard And Ports

SymptomCheckRecovery
Dashboard does not openPrinted dashboard URL and port binding.Pass --dashboard-addr 127.0.0.1:9090 or another loopback port.
/healthz works on one port but dashboard does notControl/webhook address versus dashboard address.Use the dashboard URL printed by start or serve.
Control returns 503MARS_DASHBOARD_CONTROL_SECRET is missing.Set a new random value of at least 32 bytes and restart MARS; do not place it in flags or YAML.
Control returns 401/403Session, exact Origin, or CSRF is missing or expired.Use the exact printed dashboard URL and log in again.
Pause button appears ineffectiveRunning jobs continue after authenticated pause.Pause stops new claims only. Wait for current jobs or use graceful stop if needed.
SSE stream disconnectsBrowser/network interruption or process restart.Refresh the dashboard or reconnect curl -N http://localhost:9090/api/events.
Dashboard stop times outOlder or interrupted shutdown path.Use terminal q or Ctrl+C, then inspect the command log.
mars start --repo /path/to/repo --dashboard-addr 127.0.0.1:9090 --addr 127.0.0.1:9091
curl http://localhost:9091/healthz
curl http://localhost:9090/api/status

Git And Worktree

SymptomMeaningRecovery
Dirty worktree blocks successRoles cannot hide uncommitted plans, tickets, code, docs, or evidence.Review, validate, commit, or deliberately clean the target-owned changes.
Push rejectedRemote moved or auth failed.Fetch, rebase or resolve intentionally, rerun relevant checks, then push.
Generated files tracked accidentallyWorkspace hygiene issue.Update .gitignore, remove generated output from the index, and rerun checks.
Need to inspect without mutationObserver-safe dry run.Use mars run engineer --repo /path/to/repo --dry-run --no-init.

Release And Auth

SymptomCheckRecovery
Private release auth failsmars auth github checkAuthenticate with GitHub CLI, set GH_TOKEN or GITHUB_TOKEN, or run mars auth github setup. See the Authentication And Credentials Reference.
Update check cannot reach latest releaseNetwork or remote release lookup.Use --skip-remote for local drift checks, then retry remote lookup later.
Release notes missing narrative sectionsmars release backfill-notes --repo . --checkRun mars release backfill-notes --repo . and commit compliant changelog updates.
Release assets missingRepository-approved local artifact-contract gate.Rerun the repository-approved producer and verifier. For MARS source, follow the exact publication-disabled F-018 snapshot workflow; the dist/ directory alone is not proof.
GitHub mirror missing or mismatched assets / mirror_incompleteRepository-approved remote artifact-contract gate.Keep immutable refs fixed and publication blocked until the approved gate proves exact artifact identity and inventory convergence. MARS source specifically requires F-018 signed identity; missing or unverifiable state is never clean.

Integrations

SymptomLikely causeRecovery
JIRA webhook returns not foundNo board-driven config or route is disabled.Copy .harness/integrations.example.yaml to local .harness/integrations.yaml and set flow_profile: board-driven only when opting in.
JIRA issue is ignoredProject repo map, workspace, board, label, or JQL scope rejected it.Read sanitized logs and narrow config deliberately. Do not remove containment broadly.
Atlassian MCP exposes no JIRA toolsCredential scopes or provider capabilities are insufficient.Probe with the configured provider, then fix token/admin scopes or use the documented stdio proxy path.
Integration secret appears in configRaw value was committed instead of env var name.Rotate the secret, remove it from history if needed, and store only *_env names in config.

DocSync

SymptomMeaningRecovery
docsync missing metadataAn audited source file has no top-of-file MarsDocSync block.Add the block and list the owning durable docs.
Listed doc is missingMetadata points at a nonexistent artifact.Fix the path or create the owning doc.
Audit passes but docs are semantically staleThe audit checks metadata shape and paths, not prose truth.Read the listed docs and update behavior text manually.
CLI docs stale after command changeCLI tool/skill sync rule was missed.Update CLI reference, mirrored tool guidance, generated target docs, and affected skills.
mars docsync audit --repo .
go test ./internal/docsconsistency ./internal/docsync

Evidence Bundle For Help Or Handoff

When handing a problem to another operator or agent, include enough evidence to reproduce the state without exposing secrets.

IncludeHow to collectDo not include
Exact command and repo path shapeCopy the command with sensitive paths redacted if needed.Tokens, private user names, or credential values.
Version and commitmars version, git log --oneline -3.Unrelated private branch history.
Worktree stategit status --short --branch.Raw secret diffs.
Doctor outputmars doctor --repo /path/to/repo --json.Unredacted environment variables.
Log and trace identifiersCommand log path, trace ID, job ID, role, and database path.Full raw prompts or source content unless the recipient is allowed to see them.
Quality and ticket evidencedocs/QUALITY_SCORE.md, relevant ticket, validation report, or changelog entry.Chat-only summaries as the only evidence.