You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(app): auto-accept toggle disabled when no session is open #48237
The Settings → General auto-accept permissions switch is greyed out whenever no session is open (home / new-session / draft views). Possibly the same family as #37617 / #45159 / #31137 — this report adds a root-cause analysis and a tested fix design: createPermissionScopeController resolves its directory only from session lineage, and the settings dialog never forwards the route directory it already computes.
Reproduction
Open the app with no session (home / new-session view)
Go to Settings → General
The auto-accept permissions switch is disabled (no directory context)
Open any session → the switch works (session lineage supplies the directory)
Environment
opencode v1.18.29 (source build), Linux; likely all platforms / distributions
No session open (home / draft views)
Suggested fix
Add a fallbackDirectory to the controller (session lineage first, route directory otherwise) and thread directory() from DialogSettings through SettingsGeneralV2. With no session, the switch reflects and writes the directory-level flag, which new sessions already inherit on submit (submit.tsshouldAutoAccept → enableAutoAccept). The switch stays disabled only when no directory is known at all. Tested locally (3 files, +25/−9); patch available on request.
Correction to my earlier comment: this venue is correct — sst/opencode redirects here (canonical repo, confirmed). The duplicate #48238 is closed. Apologies for the confusion.
Body reshaped to the Bug Report template (Description / Reproduction / Environment) per the compliance check. Cross-linking the same-symptom family: #37617, #45159, #31137.
Thanks for updating the issue! It now follows the Bug Report template with a clear description, reproduction steps, and environment info. The needs:compliance label has been removed.
Closing as a duplicate of #31137. Same root cause: the settings dialog gets no directory, so the auto-accept toggle is disabled (here when no session is open). Tracking in #31137.
Activity
johnhenry030888 commentedon Sep 9, 2026
Closing: filed here by tooling mistake (wrong venue — intended for sst/opencode). No action needed, apologies for the noise.
johnhenry030888 commentedon Sep 9, 2026
Correction to my earlier comment: this venue is correct —
sst/opencoderedirects here (canonical repo, confirmed). The duplicate #48238 is closed. Apologies for the confusion.johnhenry030888 commentedon Sep 9, 2026
Body reshaped to the Bug Report template (Description / Reproduction / Environment) per the compliance check. Cross-linking the same-symptom family: #37617, #45159, #31137.
github-actions commentedon Sep 9, 2026
Thanks for updating the issue! It now follows the Bug Report template with a clear description, reproduction steps, and environment info. The needs:compliance label has been removed.
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #31137. Same root cause: the settings dialog gets no directory, so the auto-accept toggle is disabled (here when no session is open). Tracking in #31137.