Aider-AI/aider · error · ValueError

Could not find start of release history

Error message

Could not find start of release history

What it means

Later in scripts/update-history.py, after collecting git log/diff it locates the editable region of HISTORY.md via the literal anchor string '# Release history'. If find() returns -1 the script raises ValueError because everything it does (extracting the current version's section, splicing the new entry) is anchored to that heading. The anchor is exact and case-sensitive; any rewording ('## Release History', 'Release notes') breaks it.

Source

Thrown at scripts/update-history.py:72


def main():
    aider_args = sys.argv[1:]

    # Get the git log and diff output
    log_content = run_git_log()
    diff_content = run_git_diff()

    # Extract relevant portion of HISTORY.md
    latest_ver = get_latest_version_from_history()
    with open("HISTORY.md", "r") as f:
        history_content = f.read()

    # Find the section for this version
    version_header = f"### Aider v{latest_ver}"
    start_idx = history_content.find("# Release history")
    if start_idx == -1:
        raise ValueError("Could not find start of release history")

    # Find where this version's section ends
    version_idx = history_content.find(version_header, start_idx)
    if version_idx == -1:
        raise ValueError(f"Could not find version header: {version_header}")

    # Find the next version header after this one
    next_version_idx = history_content.find("\n### Aider v", version_idx + len(version_header))
    if next_version_idx == -1:
        # No next version found, use the rest of the file
        relevant_history = history_content[start_idx:]
    else:
        # Extract just up to the next version
        relevant_history = history_content[start_idx:next_version_idx]

    # Save relevant portions to temporary files
    with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".log") as tmp_log:
        tmp_log.write(log_content)

View on GitHub (pinned to 5dc9490bb3)

Solutions

  1. Restore an exact line '# Release history' in HISTORY.md above the version entries.
  2. Keep the newest '### Aider vX.Y.Z' entry after that anchor so the version lookup also succeeds.
  3. git checkout HISTORY.md if the change was accidental.

Example fix

# before
## Release History

### Aider v1.2.3

# after
# Release history

### Aider v1.2.3
Defensive patterns

Strategy: validation

Validate before calling

def history_has_anchor(path="HISTORY.md") -> bool:
    return "# Release history" in open(path).read()

Prevention

When it happens

Trigger: Running update-history.py against a HISTORY.md that lacks a line containing exactly '# Release history' — renamed section, different heading level ('## Release history'), trailing whitespace is tolerated but case changes are not, or the section was deleted during a rewrite.

Common situations: Maintainers rewriting/reorganizing HISTORY.md and renaming the anchor heading; forks that restyled the changelog.

Related errors


AI-assisted analysis of Aider-AI/aider@5dc9490bb3 (2026-08-15). Data as JSON: /api/errors/f347ef9613af2ef5. Report an issue: GitHub.