Skip to content

fix(swe-agent): grant agent uid write access to /workspace - #318

Closed
cdoron wants to merge 1 commit into
Exgentic:mainfrom
cdoron:pr/swe-agent-workspace-permissions
Closed

fix(swe-agent): grant agent uid write access to /workspace#318
cdoron wants to merge 1 commit into
Exgentic:mainfrom
cdoron:pr/swe-agent-workspace-permissions

Conversation

@cdoron

@cdoron cdoron commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

run.sh creates /workspace/repo at container start as uid 1002 (the eval
framework's agent user), but / stays root:root 755 from the base image, so
mkdir failed with EACCES before the agent ever ran ("mkdir: cannot create
directory '/workspace': Permission denied", agent exit code 1, task reward 0).
Pre-create /workspace at build time and chown it to uid 1002, matching the
pattern already used for /root, /root/tools, and appworld's /app.

Verified with: eval-containers run swe-bench --agent swe-agent --model
gcp/gemini-3.5-flash-lite --local --task-id astropy__astropy-12907 — agent
now starts, connects to the model, and writes to /workspace without
permission errors.

Checked against: .agents/benchmarks/RULES.md

Signed-off-by: Doron Chen cdoron@il.ibm.com

run.sh creates /workspace/repo at container start as uid 1002 (the eval
framework's agent user), but / stays root:root 755 from the base image, so
mkdir failed with EACCES before the agent ever ran ("mkdir: cannot create
directory '/workspace': Permission denied", agent exit code 1, task reward 0).
Pre-create /workspace at build time and chown it to uid 1002, matching the
pattern already used for /root, /root/tools, and appworld's /app.

Verified with: eval-containers run swe-bench --agent swe-agent --model
gcp/gemini-3.5-flash-lite --local --task-id astropy__astropy-12907 — agent
now starts, connects to the model, and writes to /workspace without
permission errors.

Checked against: .agents/benchmarks/RULES.md

Signed-off-by: Doron Chen <cdoron@il.ibm.com>
@elronbandel

Copy link
Copy Markdown
Contributor

Superseded by #323 — once that lands (reworked to stay benchmark-agnostic per the review on #323), /workspace/repo is no longer created at all, making this mkdir/chown moot regardless of #323's exact final form.

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