feat(agent): configure PostHog exec permissions#3578
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "feat(agent): configure PostHog exec perm..." | Re-trigger Greptile |
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 4 · PR risk: 0/10 |
473168f to
98d2308
Compare
98d2308 to
bdf0d87
Compare
Review fixes for the configurable exec-permission feature: restore the needs_approval check ahead of the Claude exec gate so an explicit ask-me setting can't be bypassed by remembered approvals or hands-off modes; validate _meta.posthogExecPermissionRegex through the shared Zod schema in both adapters, warning and falling back to the default instead of crashing or silently flipping gating; filter Codex exec sub-tools in the adapter's approval handlers so local sessions only prompt for matching destructive calls (with Claude-parity hands-off in auto/full-access); make toCodexMcpServers take an honest gatePosthogExec flag; return a discriminated result from resolvePermission with distinct errors for unknown requests vs unoffered options; exempt question responses (synthetic option_<idx> ids) from the offered-option check, which was hanging cloud question relays; parse exec input via Zod; document the posthog server-name contract; unwrap README prose. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Problem
Interactive cloud runs could bypass PostHog MCP exec approvals in hands-off permission presets, while the gated sub-tools were hardcoded and Claude-specific.
Changes
(^|-)(partial-update|update|patch|delete|destroy)(-|$)--posthogExecPermissionRegexgetEffectiveModeto relay or buffer interactive approvals and auto-approve background runsautoandbypassPermissionssessionsHow did you test this code?
@posthog/weberrors from missing@posthog/quillexports;@posthog/agenttypecheck passesPublish to changelog?
Do not publish to changelog.