feat: add skip-permissions option for claude sessions - #4
Draft
davidsprague-udisc wants to merge 2 commits into
Draft
davidsprague-udisc wants to merge 2 commits into
davidsprague-udisc wants to merge 2 commits into
Conversation
Adds an optional `--dangerously-skip-permissions` passthrough for Claude Code sessions launched by the dashboard. The option is opt-in per task: a new wizard step in the new-task flow and a resume-time prompt both use a multi-option Select (rather than a y/n Confirm) so a single keystroke can't bypass the security-sensitive choice. Also includes: - Stale-pointer fix on the resume prompt: the overlay now stores the task name instead of a *TaskView, and re-resolves at execute time. Re-checks HasSession before spawning so a session started while the prompt is open attaches instead of duplicating. - Shared helper for the resume overlay's form-completion handling so the two call sites can't drift. - Window-resize propagation for the resume overlay (mirrors the existing new-task overlay behavior). - Warp terminal: poll `frontmost of process "Warp"` instead of using blind `delay` calls so keystrokes can't leak to the wrong app under load; capture osascript output and translate error -1719 into a targeted Accessibility-permission message. - LaunchConfig: document that PlanMode and SkipPermissions are mutually exclusive and prefer PlanMode (the safer option) if both are set. Also lands the skip-permissions and warp-terminal design docs under docs/brainstorms and docs/plans.
These design docs are kept local-only and shouldn't have been committed. Add docs/ to .gitignore so they stay out of future PRs.
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.
Summary
Adds an optional
--dangerously-skip-permissionspassthrough for Claude Code sessions launched by the dashboard. Opt-in per task: a new wizard step in the new-task flow and a resume-time prompt let the user choose, and both use a multi-option Select rather than a y/n Confirm so a single keystroke can't bypass the security-sensitive choice.Key changes
stepSkipPermissionsstep; selection is wired throughLaunchConfig.SkipPermissionsand added as--dangerously-skip-permissionsinSpawnInTab.PlanModeandSkipPermissionsare mutually exclusive; when both are set,PlanModewins.Review fixes folded in
taskName(string) instead of*TaskView— the tasks slice is replaced on every 5s refresh tick, so a pointer captured at prompt-open time goes stale.executeResumere-resolves the task by name and re-checksHasSessionbefore spawning; if a session appeared while the prompt was open, it attaches instead of duplicating.advanceResumePrompthelper so the two form-completion sites (Update fall-through and handleKey) can't drift.WindowSizeMsgnow mirrors width/height into the resume prompt (parity with the new-task overlay).frontmost of process "Warp"instead of blinddelaycalls so keystrokes can't leak to the wrong app under load. Capturesosascriptoutput and translates macOS error-1719into a targeted "enable Accessibility permission" message.Notes
huh.NewSelect[bool]rather thanhuh.NewConfirmspecifically to prevent y/n hotkey bypass on the security-sensitive prompt. The user must move the cursor and press enter.docs/brainstorms/anddocs/plans/.