Conversation
rtk 0.44.2+ pre-creates ~/.local/share/rtk/history.db owner-only and propagates EACCES instead of swallowing it. Ensure the data dir exists 0700, add it to Claude Code sandbox.filesystem.allowWrite, and do not write the hook-installed marker when rtk init fails. Fixes cyfinoid#31
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
rtkfails to create its tracking DB inside the aidc container:rtk 0.44.2+ now propagates that
open()error (it used to swallow it, sortk gainjust stayed at zero). Two aidc-specific causes produce the same EACCES:~/.local/share/rtkmissing or not writable byvscode.allowWritelist does not include that path (rtk-ai/rtk#320), so every sandboxedrtkcall is denied.A third bug made this sticky:
install_agent_hookswrote~/.claude/.aidc-agent-hooks-installedeven whenrtk initfailed, so later container starts never retried.Fix
mkdir/home/vscode/.local/share/rtkasvscodewith mode0700at image build.init):0700(sudo-chown if a root-owned leftover is in the way).sandbox.filesystem.allowWritein in-container~/.claude/settings.json(preserves existing entries; no-op on malformed/missing JSON).rtk initfails, so the next start retries.Verification
.github/scripts/test-bootstrap-state.sh— 16 passed, 0 failed (existing strip_host_hooks cases + 5 newensure_rtk_sandbox_writecases).bash -non the bootstrap template..github/scripts/bash-compat-check.shunder bash 3.2.57 — OK.tests/resolve-oauth-token.test.sh— 7/7 pass.shellcheck --severity=warningon the test script — clean.semgrep --config autoon changed files — 0 findings.gitleaks detect— no leaks.python3 -m py_compile bin/aidc-clipboard-server— OK.Fixes #31