Skip to content

feat: Surface ultracode as a session config option - #924

Open
rickardl wants to merge 2 commits into
agentclientprotocol:mainfrom
rickardl:feat/ultracode-config-option
Open

rickardl wants to merge 2 commits into
agentclientprotocol:mainfrom
rickardl:feat/ultracode-config-option

Conversation

@rickardl

Copy link
Copy Markdown

Summary

Adds a dedicated ultracode session config option so ACP clients can enable
ultracode (xhigh effort plus standing dynamic-workflow orchestration).

The SDK exposes it as its own boolean, separate from effortLevel:

effortLevel?: 'low' | 'medium' | 'high' | 'xhigh';
ultracode?: boolean;

Not added as a sixth effort value (as #725 suggests) because
buildConfigOptions validates against the model's supportedEffortLevels and
would fall back to default, silently dropping it.

Approach

Mirrors the existing Fast mode option: a type: "boolean" toggle for clients
advertising session.configOptions.boolean, degrading to an on/off select
otherwise, applied via applyFlagSettings({ ultracode }). The flag is pushed
before session state is updated, so a rejected control request leaves both
untouched.

Only surfaced when the current model advertises the xhigh level ultracode runs
at, and follows the model across switches the way Fast mode does. Seeded from the
settings the session was created with, since the SDK reports no ultracode state on
init and the flag is session-scoped.

Testing

npm run build, lint, format:check clean; test:run 698 passed with 14 new
tests. Verified over real ACP stdio: the option appears, toggles, and the
session's reported ultracode state follows it.

Scope

Refs #725 — the toggle only. The workflow lifecycle events and approval flow in
that issue look like they need protocol surface rather than adapter work.

The SDK exposes ultracode as its own boolean setting, separate from
effortLevel:

    effortLevel?: 'low' | 'medium' | 'high' | 'xhigh';
    ultracode?: boolean;

so it is not a sixth effort level — buildConfigOptions validates the
effort option against the model's supportedEffortLevels and would fall
back to "default" for it. Add a dedicated `ultracode` config option
instead, mirroring Fast mode: a native boolean toggle for clients that
advertise session.configOptions.boolean, degrading to an on/off select
otherwise, applied with applyFlagSettings({ ultracode }).

The option is only surfaced when the current model advertises the xhigh
effort level ultracode runs at, and follows the model across switches the
way Fast mode does — it disappears on a model that can't run xhigh and
reappears with the retained intent. The initial value is seeded from the
settings the session was created with, since the SDK reports no ultracode
state on init and the flag is session-scoped.

Refs agentclientprotocol#725. Covers only the toggle; the workflow lifecycle events and
approval flow in that issue are untouched.
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.

1 participant