Agent workspace gate for stale reads and out-of-scope file access
Teams running Claude Code, Codex CLI, OpenHands, Gemini CLI, or internal agents can add a thin workspace gate between the agent and the repository. The gate records which files the agent read, versions those files, and rejects a write when the agent is acting on stale file state. For destructive or sensitive paths, it also requires an explicit ask-to-continue step and logs the authorization reason.
STORM gives the state-management pattern: each file has a version counter, each agent carries a read snapshot, and writes are accepted only when the files behind the proposed edit are still current. OverEager-Bench adds the permission case: coding agents can complete a benign request while reading or changing resources outside the user’s authority, and permissive runtimes showed overeager rates up to 27.7% in the reported tests. A cheap first rollout is a repository-local file proxy for agent sessions that blocks writes outside declared task scope, rejects stale edits, and attaches the read/write trace to the PR.