Skip to content

Conversation

@tulga-bytes
Copy link
Collaborator

Summary

Updated the prompt and code to ensure that when the action is triggered by a user comment, the agent's responses are actual replies to that specific comment rather than standalone comments.

Changes

  • Updated src/utils/prompt.ts with explicit instructions for the agent to reply to comments using the triggering comment ID
  • Added commentId to AuggieParams type in src/utils/index.ts
  • Pass commentId through src/index.ts to runAuggie
  • Include triggering comment ID in the prompt context in src/auggie.ts

Why

Previously, the agent would sometimes create regular comments instead of threaded replies, making conversations harder to follow. This change ensures consistent behavior where responses appear as replies to the original triggering comment.


Pull Request opened by Augment Code with guidance from the PR author

## Summary
Updated the prompt and code to ensure that when the action is triggered by a user comment, the agent's responses are actual **replies** to that specific comment rather than standalone comments.

## Changes
- Updated `src/utils/prompt.ts` with explicit instructions for the agent to reply to comments using the triggering comment ID
- Added `commentId` to `AuggieParams` type in `src/utils/index.ts`
- Pass `commentId` through `src/index.ts` to `runAuggie`
- Include triggering comment ID in the prompt context in `src/auggie.ts`

## Why
Previously, the agent would sometimes create regular comments instead of threaded replies, making conversations harder to follow. This change ensures consistent behavior where responses appear as replies to the original triggering comment.
@tulga-bytes tulga-bytes self-assigned this Jan 9, 2026
@augment-app-staging
Copy link

🤖 Augment PR Summary

Summary: Ensures the agent can respond in-thread by passing the triggering commentId through the action and into Auggie’s prompt context.
Changes: Extends the system prompt with reply instructions and threads commentId from event parsing → getAuggieParams()runAuggie() → prompt assembly.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

When this action is triggered by a user comment, you MUST reply to that specific comment (not create a new standalone comment).
- A "Triggering Comment ID" will be provided in the prompt context.
- Use this comment ID to create a REPLY to that comment using the GitHub API.
- For issue comments: Use POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies or reference the comment in your reply.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub issue/PR timeline comments don’t support true threaded replies, and there isn’t a POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies REST endpoint. As written, this may cause the agent to call a non-existent API instead of posting a normal comment that quotes/links the triggering comment.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 2e2096c. Updated the prompt to:

  1. Remove the non-existent endpoint - Removed reference to POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies which doesn't exist
  2. Clarify issue comment behavior - Issue/PR timeline comments don't support threaded replies; the agent should create a new comment and reference the triggering comment via quote or link
  3. Keep PR review comment threading - in_reply_to parameter still works for PR review comments (inline code comments)
  4. Updated workflow instructions - Made the workflow section consistent with the correct API usage

Address review feedback: GitHub issue/PR timeline comments don't support
threaded replies. Updated the agent prompt to:

- Remove reference to non-existent /issues/comments/{id}/replies endpoint
- Clarify that issue comments require creating new comments with references
- Keep in_reply_to for PR review comments (which do support threading)
- Update workflow instructions to be consistent with correct API usage
@tulga-bytes tulga-bytes merged commit a2c41eb into main Jan 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants