Skip to content

feat(coding-agent): add auto approval classifier - #680

Open
realsigridjin wants to merge 4 commits into
code-yeongyu:mainfrom
realsigridjin:feat/approval-mode-cycle
Open

feat(coding-agent): add auto approval classifier#680
realsigridjin wants to merge 4 commits into
code-yeongyu:mainfrom
realsigridjin:feat/approval-mode-cycle

Conversation

@realsigridjin

@realsigridjin realsigridjin commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add auto as a first-class permission preset for settings, --permission-preset, and the Alt+A session cycle
  • classify every otherwise-pending tool proposal, including in-project edits, with a reasoning-blind two-stage model gate
  • keep assistant reasoning and tool outputs out of classifier context; only user messages and the current proposal are visible
  • preserve explicit settings/CLI rule precedence and escalate blocked, malformed, or unavailable classifier decisions to normal user approval
  • keep Shift+Tab dedicated to thinking-level cycling and the manual workspace, read-only, and ask modes available

Design

The implementation follows the auto-mode classifier architecture described by Anthropic and evaluated in AmPermBench:

  • fast stage: exact ALLOW or REVIEW
  • review stage: concise reasoning ending in DECISION: ALLOW or DECISION: BLOCK
  • fail closed: any block, malformed response, credential failure, timeout, or provider error falls back to user approval
  • no tool-name or prompt-keyword allowlist; default auto decisions are model-based
  • unlike the evaluated Tier 2 bypass, project file edits also pass through the classifier

References:

Verification

  • npm run check
  • npm run build -w @code-yeongyu/senpi
  • focused permission/shortcut suite: 254 passed
  • real AgentSession + faux-provider tool-call path: classifier invoked, bash executed, assistant reasoning absent from classifier context
  • broad suite excluding two unchanged unrelated flaky files: 6,772 passed, 35 skipped, 0 failed

The unfiltered full suite exposed two pre-existing failures outside this diff: a reftable refresh timeout and a 1 ms app-server archive timestamp comparison. The affected files are unchanged from origin/main.

@realsigridjin

Copy link
Copy Markdown
Contributor Author

@code-yeongyu All CI checks are green. I do not have upstream merge permission; please merge this PR when ready.

@realsigridjin

Copy link
Copy Markdown
Contributor Author

@code-yeongyu Updated and synchronized: Shift+Tab now remains the thinking shortcut, approval mode uses Alt+A, and the branch includes latest main without conflicts. All 14 checks pass on head f4fc7d9. I still lack upstream merge permission; please merge when ready.

@realsigridjin realsigridjin changed the title feat(coding-agent): add configurable approval modes feat(coding-agent): add auto approval classifier Aug 3, 2026
@realsigridjin

Copy link
Copy Markdown
Contributor Author

@code-yeongyu i need this feature

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