Feature request: Persist permission requests. #1502

Closed
opened 2026-02-16 17:31:16 -05:00 by yindo · 8 comments
Owner

Originally created by @AYM1607 on GitHub (Aug 26, 2025).

Originally assigned to: @thdxr on GitHub.

I think there should be an endpoint to retrieve pending permissions, or does it exist and I'm somehow missing it?

The use case is pretty self explanatory: If I have a pending permission when I close either the TUI or terminate opencode serve I'd expect to be able to retrieve it upon reopening. This is not true today.

Is it expected of the client to persist these permissions, or is the permissions data lost between server starts?

Originally created by @AYM1607 on GitHub (Aug 26, 2025). Originally assigned to: @thdxr on GitHub. I think there should be an endpoint to retrieve pending permissions, or does it exist and I'm somehow missing it? The use case is pretty self explanatory: If I have a pending permission when I close either the TUI or terminate `opencode serve` I'd expect to be able to retrieve it upon reopening. This is not true today. Is it expected of the client to persist these permissions, or is the permissions data lost between server starts?
yindo closed this issue 2026-02-16 17:31:16 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 26, 2025):

@AYM1607 the server has a cache of them but it is lost once the server is restarted, they should be persisted at the session or project level though I think that'd make more sense.

There is no endpoint for this tho what is the endpoint use case (out of curiousity)

@rekram1-node commented on GitHub (Aug 26, 2025): @AYM1607 the server has a cache of them but it is lost once the server is restarted, they should be persisted at the session or project level though I think that'd make more sense. There is no endpoint for this tho what is the endpoint use case (out of curiousity)
Author
Owner

@AYM1607 commented on GitHub (Aug 26, 2025):

I'm developing https://github.com/AYM1607/mobilecode as an alternative client to the TUI. I noticed that there was no way of getting permissions besides receiving them through SSE. I can of course persist them on the client side, but I don't think that makes too much sense.

Persisting them at the session level sounds like the right call.

@AYM1607 commented on GitHub (Aug 26, 2025): I'm developing https://github.com/AYM1607/mobilecode as an alternative client to the TUI. I noticed that there was no way of getting permissions besides receiving them through SSE. I can of course persist them on the client side, but I don't think that makes too much sense. Persisting them at the session level sounds like the right call.
Author
Owner

@rekram1-node commented on GitHub (Aug 26, 2025):

sweet

@rekram1-node commented on GitHub (Aug 26, 2025): sweet
Author
Owner

@AYM1607 commented on GitHub (Aug 26, 2025):

Happy to contribute this if you think it's a good idea @thdxr

@AYM1607 commented on GitHub (Aug 26, 2025): Happy to contribute this if you think it's a good idea @thdxr
Author
Owner

@thdxr commented on GitHub (Aug 27, 2025):

permissions requests are transient, there isn't a way right now to kill the app and open it again to continue with the permission

but we need to think about how to deal with this

@thdxr commented on GitHub (Aug 27, 2025): permissions requests are transient, there isn't a way right now to kill the app and open it again to continue with the permission<br><br>but we need to think about how to deal with this
Author
Owner

@AYM1607 commented on GitHub (Aug 27, 2025):

Agreed that there's no happy path in the TUI where this is a problem. But let's say that you restart your computer or simply just kill your terminal, and you had a pending permission, the session is now broken.

It's just more obvious when implementing an alternative client, but it can still happen to the TUI today under certain conditions.

@AYM1607 commented on GitHub (Aug 27, 2025): Agreed that there's no happy path in the TUI where this is a problem. But let's say that you restart your computer or simply just kill your terminal, and you had a pending permission, the session is now broken. It's just more obvious when implementing an alternative client, but it can still happen to the TUI today under certain conditions.
Author
Owner

@rekram1-node commented on GitHub (Aug 27, 2025):

I misread your issue, I thought you were saying if you hit always approve for a permission & then restart opencode.

my bad

@rekram1-node commented on GitHub (Aug 27, 2025): I misread your issue, I thought you were saying if you hit always approve for a permission & then restart opencode. my bad
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1502