Where does the bug appear (feature/product)?
Cloud Agent (GitHub, Slack, Web, Linear)
Describe the Bug
When a Cloud Agent is triggered via an @cursor comment on a GitHub pull request, the custom environment Docker build does not resolve build.context from .cursor/environment.json as documented. The Dockerfile itself is found and loaded correctly, but the build context arrives empty (the build log shows transferring context: 2B), so every COPY instruction fails with failed to calculate checksum of ref ...: not found and the agent aborts with “Docker build errored (exit code: 1)”.
Per the Cloud Environment Setup docs, paths in environment.json are resolved relative to the .cursor directory, so "context": "." should make the .cursor folder the build context and bare-filename COPY sources should work. That is not what happens when the agent is started from a PR comment.
Steps to Reproduce
- In a GitHub repository, create
.cursor/environment.json:
{
"build": {
"context": ".",
"dockerfile": "Dockerfile"
},
"install": "/home/ubuntu/install.sh",
"start": "/home/ubuntu/start.sh"
}
- Create
.cursor/Dockerfilethat copies sibling files (all of which exist in the.cursor/folder):
FROM maven:3.9-eclipse-temurin-25
COPY settings.xml.template /home/ubuntu/.m2/settings.xml.template
COPY install.sh /home/ubuntu/install.sh
COPY start.sh /home/ubuntu/start.sh
- Open a pull request in that repository and comment
@cursorwith any task. - The environment build fails:
COPY settings.xml.template /home/ubuntu/.m2/settings.xml.template
ERROR: failed to calculate checksum of ref ...: "/settings.xml.template": not found
COPY install.sh /home/ubuntu/install.sh
ERROR: failed to calculate checksum of ref ...: "/install.sh": not found
COPY start.sh /home/ubuntu/start.sh
ERROR: failed to calculate checksum of ref ...: "/start.sh": not found
Note in the log that transferring dockerfile: 2.53kB succeeds while transferring context: 2B shows the context is empty. Reproduces 100% of the time across multiple repositories in our organization. Repositories without a .cursor folder (default environment) work fine.
Expected Behavior
"context": "." should resolve to the .cursor directory (as documented), making the COPY sources available. At minimum, the PR-comment-triggered Cloud Agent should resolve the build context the same way as other Cloud Agent entry points, so the same environment.json works everywhere.
Either resolution would be fine from our side:
- Fix the agent so
"context": "."really does resolve relative to the.cursorfolder as documented — then existing configs that follow the docs start working again; or - If the current behavior is intended, update the “paths are relative to
.cursor” note in the Cloud Environment Setup docs to describe what the PR-comment agent actually does.
Screenshots / Screen Recordings
Operating System
Other
Version Information
Version: 3.9.16 (system setup)
VS Code Extension API: 1.105.1
Commit: 042b3c1a4c53f2c3808067f519fbfc67b72cad80
Date: 2026-06-27T06:41:01.941Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
N/A — the environment Docker build fails before any model/agent runs.
For AI issues: add Request ID with privacy disabled
bc-1657c42c-0f5c-4ff5-bca9-22ed126a5025
Additional Information
- Trigger path: GitHub integration,
@cursorcomment on a pull request. - Base image in Dockerfile:
maven:3.9-eclipse-temurin-25. - The
.cursor/environment.json+.cursor/Dockerfilesetup follows the Cloud Environment Setup docs (paths relative to the.cursorfolder). - Workaround we are testing: set
"context": ".."and prefix COPY sources with.cursor/(the pattern shown in the docs example). Even if that works, the documented"context": "."behavior is still broken for PR-comment-triggered agents.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor

