Skip to content

Conversation

Copy link

Copilot AI commented Feb 11, 2026

The conversation history included the triggering message, then the task section redundantly instructed "Respond to the user's latest message," causing the same message to be referenced twice in the prompt.

Changes

  • Mark latest message inline: Added ⬅ RESPOND TO THIS marker to the last message in conversation history
  • Remove redundant instruction: Deleted separate "Respond to the user's latest message" line from task section

Example

Before:

for (const turn of conversationHistory) {
  userPrompt += `[${role}] ${turn.content}\n\n`;
}
userPrompt += `--- YOUR TASK ---\n`;
userPrompt += `Respond to the user's latest message. `;

After:

for (let i = 0; i < conversationHistory.length; i++) {
  const marker = (i === conversationHistory.length - 1) ? ' ⬅ RESPOND TO THIS' : '';
  userPrompt += `[${role}]${marker} ${turn.content}\n\n`;
}
userPrompt += `--- YOUR TASK ---\n`;

Reduces token usage and eliminates ambiguity about which message requires a response.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update issue assistant workflow based on feedback Eliminate conversation history duplication in AI prompt Feb 11, 2026
Copilot AI requested a review from DimaBir February 11, 2026 07:18
@DimaBir DimaBir marked this pull request as ready for review February 11, 2026 07:27
@DimaBir DimaBir merged commit 5e700b9 into dimabir/github_bot_respond_wiki Feb 11, 2026
1 of 3 checks passed
@DimaBir DimaBir deleted the copilot/sub-pr-144-please-work branch February 11, 2026 07:28
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