Repository navigation
fix(agents): Gemini's file tools read the task directories /app and /tmp/data - #882
Conversation
…tmp/data gemini-cli's file tools refuse paths outside its workspace, /workspace, so a task's files under /app (as /app/handover) failed read_file with "Path not in workspace", and a binary file there never reached the model. Each run's settings now include whichever of /app and /tmp/data exist (the CLI fails to start on a missing included directory), the directories the snapshot changelog already treats as the task's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review. Context from outside this diff, on where The PR derives
Neither is under Might be deliberate — if the tasks in view always pass an explicit Generated by Claude Code |
…artifact's default for an agent A FileArtifact, file universe or URL that load_artifact puts in an agent without a destination_path lands in /tmp/file_artifacts, which the included directories left out, so its files still failed read_file with "Path not in workspace". The snapshot changelog keeps its own roots: they say what to rebuild of the agent's writable layer, not where tasks hand it files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem. gemini-cli's file tools refuse paths outside its workspace (
/workspace), so a task's files under/app(e.g./app/handover) or in/tmp/file_artifacts(whereload_artifactputs files in an agent by default) failread_filewith "Path not in workspace", and a binary file there never reaches the model.Change. Each run's system settings set
context.includeDirectoriesto whichever of/app,/tmp/dataand/tmp/file_artifactsexist (TASK_DIRS). A missing directory is left out, since the CLI fails to start on one; the check runs each turn. The snapshot changelog's roots are unchanged.Validation. Gemini unit tests pass, with a new test for the included directories. In a container with a PDF at
/app/handover/report.pdf, and again at/tmp/file_artifacts/report.pdf, and a mock model callingread_fileon it: without this change the read returns "Path not in workspace"; with it the read returns the file and its bytes reach the model.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable new issues were found.Summary
Gemini’s file tools can read existing task directories outside the workspace.
Reviews (2) · Last reviewed commit: "fix(agents): Gemini's file tools also re..." · Reviewed by Greptile