Skip to content

Conversation

@dzervas
Copy link
Contributor

@dzervas dzervas commented Nov 24, 2025

The aim is to expose the approval presets as selectable options in zed (that's what i tested against).

The following changes were made:

  • Fallback to the first preset if the config does not define one instead of returning None
  • Send back the sandbox and approval policies as metadata

Closes #72

@benbrandt
Copy link
Member

Hmm I wonder if we should be doing something similar to models where if you have configured a custom configuration that we just return that as the only option? So that you can at least see what you have selected?

We could also use a delimiter and if your profile has that, we try and parse it into approval/sandbox otherwise look for the preset?

@dzervas
Copy link
Contributor Author

dzervas commented Nov 24, 2025

yea those were my thoughts as well - the preset is hardcoded and I assume that's the case for the models as well?

I opened the PR though as a starter, maybe we can fix that later on (my code understanding regarding codex is limited). You can even overwrite the presets from the config so using the hardcoded ones doesn't make too much sense.

What I'd optimally want was something closer to claude code ask/edit/plan modes but the presets do not carry context data or alter the system prompt in any way (right?)

do you prefer merging this and opening a new issue to fix the hardcoded usage or do you want me to fix it in this PR (dont feel bad to ask for the second case, I have free will :P )?

EDIT: It seems that I got some part of the preset vs policy wrong above. there's only approval policy and sandbox policy, both of which have a hardcoded selection vector. I don't see any way to define a custom preset (e.g. sandbox to read-only but approval to on-request). there's only the profile feature which is a different thing. The approval preset has read-only, auto and full-auto and there's no ability to expand or otherwise change it. You can configure some stuff in the approval policy but not in the preset. At least that's what I gathered from the docs.

I think it would be best to stick to the TUI experience, for now at least - just my 2 cents

@benbrandt
Copy link
Member

So are you suggesting to have the user choose between all combinations of the two policies?

I need to do some work on this: https://agentclientprotocol.com/rfds/session-config-options
But this would also allow us to provide two dropdowns, one for each

@dzervas
Copy link
Contributor Author

dzervas commented Nov 25, 2025

no my suggestion is to just keep the preset like it is in this pr - readonly, auto and full auto.

if changing the protocol is possible though (no idea how "set in stone" the spec is) that would be best - especially if the exposed session config options could be toggled - allow the user to select what they see as dropdowns. some could want just the model, others just the model and preset but others model, policy and sandbox

it would allow future expansion/compatibility as well since the agents expand wildly

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.

Support codex profiles

2 participants