Skip to content

Added "Auto Mode" support (Claude Code 2.1.83+) - #141

Merged
oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:feature/auto-mode
May 24, 2026
Merged

oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:feature/auto-mode

Conversation

@oleg68

@oleg68 oleg68 commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added Auto Mode to the edit-mode combo as a static 4th entry (always visible). "Bypass Permissions" remains dynamic and now appears after Auto Mode, reflecting the permissiveness order.
  • EditMode enum reordered from least to most permissive: PLAN < DEFAULT < ACCEPT_EDITS < AUTO < BYPASS_PERMISSIONS. This enables ordinal-based >= comparisons for permission thresholds.
  • Hook auto-allow logic updated: AUTO or higher → unconditional allow; ACCEPT_EDITS or higher → conditional allow (inside project root only).
  • sendShiftTabsUntilMode() refactored: when user selects Auto Mode but CC doesn't support it (older version), falls back to Bypass Permissions, then Accept on Edit.
  • ScreenContentDetector detects "auto mode" in the TUI footer.

Test plan

  • ScreenContentDetectorTest — 2 new tests for auto mode detection
  • NetBeansMCPHandlerHookTest — 2 new tests: auto mode auto-allows files inside and outside project
  • ClaudeSessionTabBypassComboTest — updated counts (4 base items, 5 with bypass)
  • 864 tests pass, 0 failures
  • Manual: auto mode detected → combo shows "Auto Mode"; file edits auto-approved; restart removes Bypass entry but keeps Auto Mode entry

🤖 Generated with Claude Code

Auto mode is a classifier-based permission mode introduced in CC 2.1.83
(Max/Team/Enterprise/API plans) that auto-approves safe tool calls
including all file edits.

Changes:
- EditMode enum reordered by permissiveness (PLAN < DEFAULT <
  ACCEPT_EDITS < AUTO < BYPASS_PERMISSIONS); AUTO added between
  ACCEPT_EDITS and BYPASS_PERMISSIONS
- Hook auto-allow logic replaced with ordinal-based >= comparisons:
  AUTO+ unconditional allow, ACCEPT_EDITS+ conditional (inside project)
- "Auto Mode" added as a static 4th entry in the edit-mode combo;
  "Bypass Permissions" remains dynamic and appears after Auto Mode
- sendShiftTabsUntilMode() refactored; when AUTO is selected but not
  found (old CC), falls back to BYPASS_PERMISSIONS then ACCEPT_EDITS
- ScreenContentDetector detects "auto mode" in TUI footer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit db567b6 into nbplugins:main May 24, 2026
3 checks passed
@oleg68
oleg68 deleted the feature/auto-mode branch May 24, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant