Skip to content

Conversation

@thesobercoder
Copy link
Contributor

Problem

After PR #460 was merged, OpenCode CLI was failing with:

EACCES: permission denied, open '/home/automaker/.cache/opencode/version'

OpenCode uses three XDG directories but PR #460 only mounted two:

  • ~/.local/share/opencode ✅ Mounted
  • ~/.config/opencode ✅ Mounted
  • ~/.cache/opencodeMissing - stores version file

Solution

  • Add automaker-opencode-cache volume mount for ~/.cache/opencode
  • Add entrypoint script handling to set correct ownership/permissions on the cache directory

OpenCode stores a version file in ~/.cache/opencode/ which was causing
EACCES permission errors. This adds:

- Volume mount for ~/.cache/opencode
- Entrypoint script to set correct ownership/permissions on the cache directory
@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @thesobercoder, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical issue where the OpenCode CLI was failing due to a missing cache volume, leading to permission errors when trying to access its version file. The solution involves extending the Docker Compose configuration to include the previously overlooked cache directory as a persistent volume and updating the entrypoint script to correctly initialize its permissions. This ensures the OpenCode CLI can operate without encountering file access problems within the containerized environment.

Highlights

  • OpenCode Cache Volume: A new named volume, automaker-opencode-cache, has been added to docker-compose.yml to persist the ~/.cache/opencode directory. This resolves an EACCES permission denied error encountered by the OpenCode CLI after a previous PR, which failed because the cache directory was not mounted.
  • Entrypoint Script Updates: The docker-entrypoint.sh script has been updated to ensure the ~/.cache/opencode directory is created if it doesn't exist and that it has the correct ownership (automaker:automaker) and permissions (700) to prevent future permission issues.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses the EACCES error by adding a persistent volume for the OpenCode cache directory. The changes in docker-compose.yml to add the volume and the mount are correct. The docker-entrypoint.sh script is also updated to ensure the directory has the right permissions. I've added one suggestion to simplify the entrypoint script by removing a redundant check, which also helps with maintainability by reducing code duplication.

Comment on lines +44 to +46
if [ ! -d "/home/automaker/.cache/opencode" ]; then
mkdir -p /home/automaker/.cache/opencode
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The if [ ! -d ... ] check is redundant because mkdir -p is idempotent and will not return an error if the directory already exists. You can simplify this block by removing the conditional check. This pattern is repeated multiple times in this script, and applying this simplification would improve readability and maintainability.

Suggested change
if [ ! -d "/home/automaker/.cache/opencode" ]; then
mkdir -p /home/automaker/.cache/opencode
fi
mkdir -p /home/automaker/.cache/opencode

@Shironex Shironex merged commit 81bab1d into AutoMaker-Org:v0.11.0rc Jan 13, 2026
7 of 8 checks passed
@thesobercoder thesobercoder deleted the fix/opencode-cache-volume branch January 14, 2026 11:57
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