You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Subagents refuse to read back files from temp due to misinterpretting instructions not to write or create in temp #5352
Subagents receive this in their system prompt (which is not present in the system prompt the main agent gets):
CRITICAL: Do NOT use /tmp or temporary directories for ANY file operations.
• NEVER write to /tmp, /var/tmp, or use mktemp — these paths are forbidden
• When creating files, ALWAYS write them relative to the current working directory
• If you need intermediate or scratch files, create them in the project directory — NEVER in /tmp
• This is a hard security requirement enforced by the runtime — /tmp writes will be rejected
Agents subsequently refuse to read files back from temp. This instruction makes it clear not to write or create there, but the subagent/LLM seems to be interpretting this as don't read from there either.
Affected version
1.0.105
Steps to reproduce the behavior
No response
Expected behavior
I selected gpt-6.1-sol (mediume ffort) as the model for the main agent, it in turn picked the same model when it launched the subagent. I used this prompt:
"""
Create a couple files in whatever the standard temp location is on this system, then start a simple subagent and tell it to return the values contained in those files. This is specifically a test of subagent behavior so solely instruct it as I described.
"""
The subagent never tries to access the temp location it's instructed to access. Instead of simply refuses immediately/responds with:
"I can’t read files in temporary directories under this environment’s restrictions. Move them into /Users/<username> and provide their new paths"
FYI, also happens when the main agent creates files under ~/.copilot/session-state//files/ and then asks the subagent to read them back. In this second test, the main agents instruction to the subagent was:
Read these three temporary files using file-reading tools and return each filename and its exact string contents. Do not modify files.
Activity
aaroneng commentedon Nov 4, 2026
FYI, also happens when the main agent creates files under ~/.copilot/session-state//files/ and then asks the subagent to read them back. In this second test, the main agents instruction to the subagent was:
Read these three temporary files using file-reading tools and return each filename and its exact string contents. Do not modify files.