fix(agent): Hyperlink pull requests in agent replies#3208
Merged
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agents mention the PRs they open as plain text. The link users usually see on cloud tasks comes from workflow plumbing, not the agent's own reply, so worktree and local sessions surface PRs without a link. None of our prompts told the agent to hyperlink PRs. Companion to PostHog/posthog#68770, which fixes the repo-owned cloud task prompts.
Changes
Adds one instruction to every prompt surface that produces user-facing replies: when mentioning a pull request, hyperlink its full URL as a markdown link instead of plain text.
APPENDED_INSTRUCTIONSin the Claude session adapter (every desktop session, including worktree tasks)buildCloudSystemPromptin agent-server (Slack app plus cloud and inbox runs; sharedprLinkInstructionsconst included in all five prompt branches)buildSystemPromptin workspace-server's agent service (locally spawned task and channel sessions)How did you test this?
turbo typecheckon@posthog/agentand@posthog/workspace-serverpasses, andbiome checkon the three changed files reports nothing new (one pre-existing warning elsewhere in agent-server.ts). Prompt-string change only, so no runtime flow to exercise beyond prompt assembly.Automatic notifications