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.
- Its review and the comment it answers: a GraphQL review comment (PullRequestReviewComment) has
pullRequestReview, the pull request review associated with it, andreplyTo, the comment it is a reply to (PullRequestReviewComment). - Who resolved it: a GraphQL thread also has
resolvedBy, the user who resolved it, andisCollapsed, whether it has been collapsed (resolved).viewerCanResolve,viewerCanUnresolveandviewerCanReplysay what the user asking can do with it (PullRequestReviewThread). - Drafted and published: on the same comment,
draftedAtis when it was created in a draft state, andpublishedAtis when it was published (PullRequestReviewComment).
To see which comments are on older lines: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs, names the earlier commit next to the file and line of such a thread, and its marker in the diff says the comment was made at an earlier commit and that the line may now hold other code.
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). - Show outdated, Hide outdated: holding
Alt(Windows and Linux) orOption(Mac) while clicking Show outdated or Hide outdated collapses or expands all outdated or resolved review comments in the pull request at once (GitHub's keyboard shortcuts for the Files changed tab).
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).
- Pending: line comments in a review that has not been submitted are pending, and only the person writing them sees them. Others see them once that person clicks Submit review. To cancel, click Submit review, then Discard review: the review goes, with all its pending comments (GitHub's documentation on starting a review).
- Pending in GraphQL: the
stateof a review comment isPENDINGfor a comment that is part of a pending review, andSUBMITTEDfor one that is part of a submitted review (PullRequestReviewCommentState).
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). - A suggested change in it: once the comment is outdated, its suggestion can no longer be committed, and GitHub says
Outdated suggestions cannot be applied.Ask for a new suggestion on today's lines (see why a suggested change cannot be applied). - Done with it: when a later commit dealt with it, resolve the conversation.
- From a script or an app: the GraphQL mutations
resolveReviewThreadandunresolveReviewThreadtake the thread'sthreadId(resolveReviewThread). Thepull_request_review_threadwebhook event comes with the actionresolvedwhen a thread is marked as resolved, andunresolvedwhen a previously resolved thread is marked as unresolved, with thepull_requestand thethread. A GitHub App needs at least read-level access for the "Pull requests" repository permission to subscribe (pull_request_review_thread). - List the outdated threads:
gh api graphql -F owner=OWNER -F name=REPO -F number=NUMBER -f query='query($owner: String!, $name: String!, $number: Int!) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { reviewThreads(first: 100) { nodes { id path originalLine isOutdated isResolved } } } } }' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isOutdated and (.isResolved | not))'prints the outdated threads that are not resolved yet, each with theidthatresolveReviewThreadtakes.-Fsends the number as an integer, and the fields other thanquerygo as GraphQL variables (gh api).firsttakes 1 to 100 (node limit); past 100 threads, go on withafter(PullRequest.reviewThreads).
In IntelliJ IDEA: the OUTDATED tag is GitHub's, and the IDE follows the old line through the commits
Checked in the IntelliJ IDEA source on October 31, 2026: pullRequestReviewThread.graphql, GHPullRequestReviewThread.kt, GHPRTimelineThreadViewModel.kt, GHPRTimelineThreadComponentFactory.kt, GHPRThreadsViewModels.kt, CollaborationToolsBundle.properties.
For each review thread, the IDE asks GitHub for these fields, among others:
isOutdated
path
subjectType
diffSide
line
originalLine
startDiffSide
startLine
originalStartLine
From the thread's first comment it also takes commit and originalCommit. startLine and originalStartLine are for a comment on a range of lines.
In the timeline, the thread carries an OUTDATED tag exactly when GitHub returns isOutdated as 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 line on commit when there is one, otherwise by following originalLine on originalCommit through 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).
Get it on JetBrains Marketplace
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 · 日本語