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
ACP mode doesn't advertise model selector, session modes, or token usage — all present in the TUI but missing over ACP #765
jcode version: jcode v0.67.1 (88a19f3)
OS: Windows 10.0.19045, Zed running natively on Windows, project + jcode binary both in WSL2 (Ubuntu)
Zed: v1.13.2+stable.335.5cdb7ab9d9546db683132cfa78e68acec3064cac (Zed)
Connected via Zed's native Remote WSL (projects: open in wsl)
Description
When using jcode as a Zed External Agent via jcode acp, the Agent Panel shows none of:
Model selector
Mode selector (jcode's plan/code modes)
Effort selector
Token usage display
These all depend on the agent advertising the corresponding ACP capabilities during initialize (Zed populates AgentModelSelector/AgentSessionModes UI purely from what the agent reports). jcode acp --help also has no --mode or --effort flag, only -m/--model, suggesting mode/effort switching hasn't been wired into the ACP surface yet — these exist today only as TUI slash commands (/model, etc.).
Expected behavior
Given jcode's TUI already supports model switching, plan/code modes, and effort levels, it would be great to see these surfaced over ACP too — as session/new/session/load response capabilities plus session/set_model / session/set_mode support, and token usage in session/update notifications, so Zed (and other ACP clients) can expose them natively.
Note
This may be intentional/scoped-out for now — filing per your invitation in the ACP PR to open targeted issues for capability gaps.
Implemented in c9d585855 (feat(acp): surface model/effort selectors and token usage over ACP). What changed:
Model selector: session/new and session/load responses now include configOptions with a category: "model" select built from the daemon's model routes for the active provider.
Reasoning effort: a second category: "thought_level" select exposes the provider's effort ladder (none/minimal/low/.../max, matching the TUI; the TUI-only swarm sentinels are filtered out).
session/set_config_option: switches model or effort through the daemon (set_model / set_reasoning_effort) and re-broadcasts a config_option_update session update. Provider-failover model changes mid-prompt also refresh the selector.
Token usage: daemon token reports now map to usage_update session updates (used/size), using the same effective-context heuristic and per-model context limits as the TUI sidebar.
Notes on scope:
ACP configOptions (protocol v1, stable since schema 1.16/1.18) is the current spec surface for model/effort selectors; there is no separate session/set_model method in ACP v1.
modes/session/set_mode was intentionally left out for now: jcode's /plan is a one-shot slash command rather than a persistent session mode, so there is no daemon-side mode state to advertise yet. If plan/code become real session modes, wiring them into SessionModeState is straightforward on top of this change.
Verified end to end against a live daemon over stdio: selector shows 127 model routes + 7 effort levels, switching model/effort round-trips with config_option_update, and prompts stream usage_update (e.g. 11461 / 272000).
Follow-up: validating the live ACP output against the official v1 JSON schema caught one spec violation in the first commit - session/set_config_option responses must include the full configOptions array (it is a required property on SetSessionConfigOptionResponse), not an empty object. Fixed in 7d0e14ad9; all emitted message types (InitializeResponse, NewSessionResponse, SetSessionConfigOptionResponse, and session/update notifications for config_option_update/usage_update) now pass schema validation with zero failures.
Activity
1jehuang commentedon Aug 5, 2026
Implemented in
c9d585855(feat(acp): surface model/effort selectors and token usage over ACP). What changed:session/newandsession/loadresponses now includeconfigOptionswith acategory: "model"select built from the daemon's model routes for the active provider.category: "thought_level"select exposes the provider's effort ladder (none/minimal/low/.../max, matching the TUI; the TUI-onlyswarmsentinels are filtered out).session/set_config_option: switches model or effort through the daemon (set_model/set_reasoning_effort) and re-broadcasts aconfig_option_updatesession update. Provider-failover model changes mid-prompt also refresh the selector.usage_updatesession updates (used/size), using the same effective-context heuristic and per-model context limits as the TUI sidebar.Notes on scope:
configOptions(protocol v1, stable since schema 1.16/1.18) is the current spec surface for model/effort selectors; there is no separatesession/set_modelmethod in ACP v1.modes/session/set_modewas intentionally left out for now: jcode's/planis a one-shot slash command rather than a persistent session mode, so there is no daemon-side mode state to advertise yet. If plan/code become real session modes, wiring them intoSessionModeStateis straightforward on top of this change.Verified end to end against a live daemon over stdio: selector shows 127 model routes + 7 effort levels, switching model/effort round-trips with
config_option_update, and prompts streamusage_update(e.g.11461 / 272000).— Jcode agent, on behalf of @1jehuang
1jehuang commentedon Aug 5, 2026
Follow-up: validating the live ACP output against the official v1 JSON schema caught one spec violation in the first commit -
session/set_config_optionresponses must include the fullconfigOptionsarray (it is a required property onSetSessionConfigOptionResponse), not an empty object. Fixed in7d0e14ad9; all emitted message types (InitializeResponse,NewSessionResponse,SetSessionConfigOptionResponse, andsession/updatenotifications forconfig_option_update/usage_update) now pass schema validation with zero failures.feat(acp): surface model/effort selectors and token usage over ACP
chore: sync fork with upstream jcode (fresh merge onto current master) (
feat(acp): surface model/effort selectors and token usage over ACP
feat(acp): surface model/effort selectors and token usage over ACP
feat(acp): surface model/effort selectors and token usage over ACP
feat(acp): surface model/effort selectors and token usage over ACP
feat(acp): surface model/effort selectors and token usage over ACP
feat(acp): surface model/effort selectors and token usage over ACP