-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix(code): make Auto mode generally available #4957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d8a9d67
ab7d2b6
423f9fe
33884b5
c07da7f
f138503
9be9bc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,8 +152,8 @@ def __init__( | |
| file-operation previews. | ||
| id: Optional widget ID. Defaults to 'approval-menu'. | ||
| auto_mode_eligible: Whether Auto mode can be enabled in this session. | ||
| When `False` (e.g. the experimental opt-in is off), the "Enable | ||
| Auto for this thread" option is not offered. | ||
| When `False` (e.g. a sandbox is active), the "Enable Auto for this | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flagging Mason Daugherty (@mdrxy) - why would this be false when a sandbox is active? Surely there are actions we potentially want to deny even when in a sandbox? Another question would be - do we really need this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok looks like this is a deliberate decision - would you provide some info so I understand?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Auto is local-only for now on purpose. Under the hood Auto does more than “skip the approve prompt.” It makes judgment calls using context about this machine’s project: where the repo root is, what the git remote looks like, and whether a path is inside that trusted tree. Those checks are built for a normal local worktree on the host. A sandbox breaks that assumption. Tools aren’t writing to the same FS the host process is looking at — paths, symlinks, and “where is the project root?” can mean something different inside Daytona/Runloop/etc. If we naively reused the host-side checks, Auto could allow or deny for the wrong reasons. Same issue for the temporary files Auto has the agent use for scratch: those are allocated in the host temp dir today, which isn’t the same place sandbox tools run. Important distinction: sandbox sessions still get normal Manual approvals in the TUI. We’re only holding back the classifier auto-approve path until it’s honest there. Making Auto work with sandboxes later isn’t a new product mode. Same Shift+Tab / fallback UI. We’d just need the policy to reason about the sandbox's workspace (remote root, remote path semantics, scratch that actually lives where tools run — or host-temp disabled under sandbox). Once that binding is solid, Auto + sandbox can ship together. |
||
| thread" option is not offered. | ||
| **kwargs: Additional keyword arguments passed to the Container base class. | ||
| """ | ||
| super().__init__(id=id or "approval-menu", classes="approval-menu", **kwargs) | ||
|
|
@@ -427,9 +427,8 @@ def _build_options(self) -> list[tuple[str, str]]: | |
| """Build the visible options as `(label, decision_type)` pairs. | ||
|
|
||
| The Auto option is omitted unless Auto can actually be enabled | ||
| (`_show_auto_option`), so it is never suggested outside the | ||
| experimental opt-in. Labels are unnumbered; `_update_options` | ||
| prefixes the display number. | ||
| (`_show_auto_option`), so it is never suggested outside the local TUI. | ||
| Labels are unnumbered; `_update_options` prefixes the display number. | ||
|
|
||
| Returns: | ||
| Ordered `(label, decision_type)` pairs for the visible options. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.