← Back to Pull requests

fix(profile-claude): the briefing settings allow reading /run/agent-sandbox and writing the summary line, so a role is not asked #393

Closed
unknown closed this pull request without merging on Nov 11, 2026 20:15 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 12:42 UTC
Author

A role without a start text, a gh-review role for one, asked at every new session: "Read outside the working directories — Read(/run/agent-sandbox/briefing.md) … Allow this read?" The briefing lives at /run/agent-sandbox/, outside the project, and the claude profile added that directory with --add-dir only for a role with a start text (its /start command). A session also could not keep its summary line, /run/agent-sandbox/summary/line, current without being asked.

The settings the claude profile hands Claude Code at every briefed launch and join now allow both, as permission rules:

Read(//run/agent-sandbox/**)
Edit(//run/agent-sandbox/summary/line)     # where the summary line is bound

(// is Claude Code's form for an absolute path, and Edit covers every built-in tool that edits a file: https://code.claude.com/docs/en/permissions.) The paths come from the briefing directory and summary line the engine hands the profile. They are narrower than --add-dir, which would also allow edits anywhere there; the --add-dir for a start text stays. A user's own --settings rules are merged first, and their deny and ask rules still win; a user permissions value that is not an object is left as it is, the engine adds no rules to it and says so, and the briefing's hooks are installed all the same. The trust review and --check do not list the two: no dot-file line asks for them, and they allow nothing the sandbox does not already give (the directory is read-only inside, the line is the session's own).

Tests: tests/unit/briefing.bats (both rules for a role with and without a start text, at a launch, a -p launch and a join; a user's allow, deny and ask surviving), serve.bats. scripts/check.sh passes locally. Not yet tried against a live session.

---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._

Diff: 235 lines (+176 / -59) across 2 files Reviewer: pearu Review duration: 453m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 235 lines diff across 2 files
0.42
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.327
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #393"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.1% (MEDIUM) · Higher = larger blast radius
42.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.7% · Safe to merge
16.7%