Skip to content

Inline suggestions are not being posted to the Changes tab in GitLab #2410

@crmpicco

Description

@crmpicco

Git provider

Gitlab

System Info

Environment

  • PR Agent image: pragent/pr-agent:latest
  • GitLab Community Edition (self-hosted)
  • Git provider: GitLab
  • Model: openai/gpt-5.2 via custom OpenAI-compatible proxy
  • Runner: GitLab CI Docker executor (gitlab-runner 18.11.3)

Bug details

Description

When running the improve command via the CLI, code suggestions are never posted as inline comments in the GitLab merge request "Changes" tab. They always appear as a single persistent comment in the "Overview" tab instead.

The review command has inline_code_comments = true set in .pr_agent.toml. We have not been able to confirm whether this works because the review has consistently returned key_issues_to_review: [] on the PRs tested so far. We intend to test this further on a PR with genuine issues but are raising this separately in the meantime as the improve behaviour is clearly reproducible.

Expected behaviour

Code suggestions from improve should be posted as inline diff comments directly on the relevant changed lines in the "Changes" tab, making them actionable in context.

Actual behaviour

The improve command generates suggestions correctly but publishes them via publish_persistent_comment_with_history, which creates or updates a single top-level MR note in the Overview tab. The note URL takes the form https:////-/merge_requests/#note_, confirming it is a standard MR note rather than a diff-positioned discussion.

Relevant log lines from a run where one suggestion was generated:

  2026-05-26 05:59:38.731 | INFO  | pr_agent.tools.pr_code_suggestions:_get_prediction:408   - ...                                                   
  2026-05-26 05:59:43.575 | INFO  | pr_agent.algo.ai_handlers.litellm_ai_handler:chat_completion:581 - AI response: [suggestion generated            
successfully]                                                                                                                                        
  2026-05-26 05:59:44.569 | INFO  | pr_agent.tools.pr_code_suggestions:publish_persistent_comment_with_history:335 - Persistent mode - updating      
comment https://<host>/<project>/-/merge_requests/1354#note_172017 to latest suggestions message                                                     

The suggestion was visible in the Overview tab but absent from the Changes tab entirely.

Configuration

.gitlab-ci.yml (relevant extract):

  - 'python -m pr_agent.cli --pr_url="$MR_URL" review'                                                                                               
  - 'python -m pr_agent.cli --pr_url="$MR_URL" improve'                                                                                              

.pr_agent.toml (relevant extract):

  [pr_reviewer]                                                                                                                                      
  inline_code_comments = true                                                                                                                        
                                                                                                                                                     
  [pr_code_suggestions]                                                                                                                              
  num_code_suggestions = 5                                                                                                                           
  rank_suggestions = false                                                                                                                           

Question

Is posting improve suggestions as inline diff comments in the GitLab Changes tab supported in the open source version, and if so, what configuration is required to enable it? We could not find a clear feature comparison between the open source and Pro versions that clarifies this. If it is a Pro-only feature, it would be helpful to have it documented explicitly in the README or on a comparison page so users know what to expect when self-hosting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions