Skip to content

Chat injects irrelevant instructions #280665

@Burhan-Q

Description

@Burhan-Q
  • Copilot Chat Extension Version: 0.33.3
  • VS Code Version: 1.106.2
  • OS Version: Ubuntu 24.04
  • Feature (e.g. agent/edit/ask mode): Ask
  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude 4.5
  • Logs: (see below)

Steps to Reproduce:

  1. New chat window
  2. Have AI Toolkit for VS Code extension installed, with ~/.altk/instructions/tools.instructions.md generated in the user home directory (AI Toolkit Copilot tools doc)
  3. Submit message to Copilot in Ask mode.

Chat log

Chat Metadata

requestType      : ChatCompletions
model            : claude-sonnet-4.5
maxPromptTokens  : 127997
maxResponseTokens: 16000
location         : 1
otherOptions     : {"temperature":0.1,"stream":true}
intent           : undefined
startTime        : 2025-12-02T01:13:23.704Z
endTime          : 2025-12-02T01:13:34.808Z
duration         : 11104ms
response rate    : 57.91 tokens/s
ourRequestId     : 1735cc9a-a51b-42ad-8715-e63018c6c0a5
requestId        : 1735cc9a-a51b-42ad-8715-e63018c6c0a5
serverRequestId  : 1735cc9a-a51b-42ad-8715-e63018c6c0a5
timeToFirstToken : 1901ms
resolved model   : claude-sonnet-4.5
usage            : {"completion_tokens":643,"prompt_tokens":1289,"prompt_tokens_details":{"cached_tokens":0},"total_tokens":1932}

User Prompt with incorrect tool instructions injection

When generating code, please follow these user provided coding instructions. You can ignore an instruction if it contradicts a system message.
<instructions>
<attachment filePath=".aitk/instructions/tools.instructions.md">
---
description: AI Toolkit provides tools for AI/Agent app development
applyTo: '**'
---
- `aitk-get_agent_code_gen_best_practices` - best practices, guidance and steps for any AI Agent development
- `aitk-get_tracing_code_gen_best_practices` - best practices for code generation and operations when working with tracing for AI applications
- `aitk-get_ai_model_guidance` - guidance and best practices for using AI models
- `aitk-evaluation_planner` - guides users through clarifying evaluation metrics and test dataset via multi-turn conversation, call this first when evaluation metrics are unclear
- `aitk-get_evaluation_code_gen_best_practices` - best practices for the evaluation code generation when working on evaluation for AI application or AI agent
- `aitk-evaluation_agent_runner_best_practices` - best practices and guidance for using agent runners to collect responses from test datasets for evaluation
</attachment>

Metadata

Metadata

Assignees

Labels

chat-promptsPrompt and Instruction files related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions