GitHub: why a line comment is outdated, or not on the diff
A comment on lines of a pull request is made on a commit (commit_id) and on lines of a file at that commit. GitHub's documentation for creating one says that a comment not made on the latest commit may become outdated when a later commit changes its line, and the GraphQL API marks such a review thread with isOutdated: "outdated by newer changes". The comment is not lost; GitHub keeps the commit and the lines it was made on (checked October 26, 2026).
query {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: NUMBER) {
reviewThreads(first: 100) {
nodes { path isOutdated isResolved line originalLine diffSide subjectType }
}
}
}
}
What GitHub keeps
- REST (
GET /repos/OWNER/REPO/pulls/NUMBER/comments): each comment hascommit_idandoriginal_commit_id,lineandoriginal_line(for a range alsostart_lineandoriginal_start_line), andside. Theoriginal_fields are the commit and the lines the comment was made on;diff_hunkis the diff around the line as it was.positionandoriginal_position, places in the diff rather than lines of the file, are closing down in favor oflineandoriginal_line. - GraphQL (
PullRequestReviewThread):isOutdated,line(the line in the file the thread refers to) andoriginalLine,diffSide, andsubjectType, a line or a whole file. Each comment (PullRequestReviewComment) hasoutdated,commitandoriginalCommit. - Lines of the file, not of the diff: an original line number counts in the file at the original commit. In today's file the same number may hold other code, or be past the end.
Where outdated conversations show
- On github.com: the Conversations menu on the Files changed tab shows which conversations are unresolved, resolved, and outdated (GitHub's documentation on commenting on a pull request).
- Outdated is not resolved: they are two separate marks (
isOutdatedandisResolvedin GraphQL). A resolved conversation collapses. Resolving takes having opened the pull request or write access to the repository (see why a conversation was not resolved).
Not on today's diff
- Its lines changed: the comment is outdated, and its place is the original line at the original commit.
- The file is no longer among the changed files: when later commits undo a file's changes, the file drops out of the pull request's diff. The comment keeps its path.
- A comment on the whole file (
subject_typefile) has no line to show at. - Deleted: reading a deleted comment answers 404 (deleting answers 204), and so does a reply to a thread whose first comment was deleted (see why a comment or reply was refused).
What to do
- See the code it was about: the file at
original_commit_id(GET /repos/OWNER/REPO/contents/PATH?ref=SHA, or that commit on github.com), lineoriginal_line;diff_hunkshows the lines around it as they were. - Comment on today's code: a new comment with the head commit as
commit_idand lines of today's diff (see why a comment on lines was refused). - Done with it: when a later commit dealt with it, resolve the conversation.
In IntelliJ IDEA: the OUTDATED tag is GitHub's, and the IDE follows the old line through the commits
How the GitHub support built into IntelliJ IDEA handles an outdated review thread, in its source (checked October 31, 2026; IntelliJ IDEA: pullRequestReviewThread.graphql, GHPullRequestReviewThread.kt, GHPRTimelineThreadViewModel.kt, GHPRTimelineThreadComponentFactory.kt, GHPRThreadsViewModels.kt, CollaborationToolsBundle.properties):
- What it reads: for each thread, GitHub's
isOutdated,lineandoriginalLine(withstartLineandoriginalStartLinefor a range), and from the first comment itscommitandoriginalCommit. - In the timeline, the thread carries an OUTDATED tag exactly when GitHub returns
isOutdatedas true. Its code is the diff hunk GitHub saved with the thread, marked at the line it was written on (originalLine). When GitHub returns an empty hunk, which the source notes for file-level comments and some outdated threads, no code is drawn for it. - In the diff and the editor, it looks for the thread's place in today's changes: with GitHub's current
lineoncommitwhen there is one, otherwise by followingoriginalLineonoriginalCommitthrough the pull request's commits. When the file of that commit is not among the pull request's changes, or the line cannot be followed, the thread gets no place there.
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, reads each line comment's line, and for a comment GitHub gives without a current line, original_line and original_commit_id. On the Comments tab such a thread names the earlier commit next to its file and line ("the lines have changed since"); in the file's diff its marker stays at the line number it had then, and its tooltip says the comment was made at an earlier commit and that the line may now hold other code. A comment on a whole file is not called outdated. Resolved threads say who resolved them. Going to a comment whose file is no longer among the changed files says so. The review inbox, diffs and conversations are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: GitHub merge refused (405, 409) · GitHub review refused (422) · GitHub search 422 "Validation Failed" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · "API rate limit exceeded" · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for an approval of the most recent push · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge waiting for a team's approval (Required reviewers) · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub pull request not closing or reopening · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a Dependabot pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語