Skip to content

ACP: native model picker + per-session approval controls (config options) #176

Closed

Description

@ajianaz

What problem does this solve?

Driving tole acp from a GUI ACP host (Termul, Zed) today is all-or-nothing:

  • Approval fatigue: every Write tool call surfaces a session/request_permission prompt offering only allow_once / reject_once. A multi-step task means approving the same tool a dozen times. The only escape hatches are process-start flags (--yes, --allow, --trust) or the TOLE_TRUST env — none of which the human in the editor can change mid-session.
  • No model choice: the model is whatever TOLE_MODEL was in the agent process env. Hosts that render a model picker (Termul does) show nothing because tole never advertises one; switching model means editing the agent entry and restarting the session.

ACP ≥ 0.14 has a first-class mechanism for exactly this — session config options (configOptions on the session response, session/set_config_option, category model/mode/thought_level) — and Termul already renders it (model picker + mode selectors derive from configOptions).

Proposed solution

Two PRs, one issue:

PR 1 — model picker (config option model)

  • TOLE_MODELS env (comma-separated model ids) makes session/new / session/load return a configOptions entry: {id: "model", name: "Model", category: "model", type: "select", currentValue, options[]}. Unset → nothing advertised (today's behavior, picker stays hidden).
  • session/set_config_option validates the value against the list and persists it as a fact/model register write — the sanctioned append-only mutable state — so run_session_turn (shared with tole serve) applies it when building the provider, and session/load in a fresh process restores the right currentValue (resume parity).
  • The active model is always a member of the advertised list (prepended if TOLE_MODELS omits it).

PR 2 — approval controls

  • Permission requests gain an allow_always option (Write-risk calls only; Destructive never offers it and is still structurally un-allowlistable). Choosing it appends the exact tool name to the session approver's pattern store — the same --allow mechanism, granted interactively instead of at startup.
  • A mode-category select (ask / auto_write) flips the --yes semantics per session from the UI, via shared approver state. Session-scoped (not durable) by design: consent resets with the process.
  • thought_level (reasoning effort) is explicitly out of scope here — it touches the provider request wire shape (a Tier-1 contract) and deserves its own issue.

Alternatives considered

  • Multiple agent entries in the host (one per flag combination) — works today (the Termul wrapper forwards args/env) but the picker UX is strictly better and needs no per-host setup.
  • Legacy modes field in addition to configOptions — the spec's transition advice; skipped for now since target hosts (Termul) read configOptions and modes is slated for removal.
  • Per-session durable approval memory — rejected: approval consent should not outlive the process that granted it.

Are you willing to contribute the implementation?

Yes, I can do it

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions