Skip to content

ACP mode doesn't advertise model selector, session modes, or token usage — all present in the TUI but missing over ACP #765

Closed

Description

@sergiomeneses

Environment

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.

Activity

  1. added
    enhancement
    priority: medium
    triage: needs-decision
    autonomous: no
    on Aug 4, 2026
  2. 1jehuang commented on Aug 5, 2026

    @1jehuang
    Owner

    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).


    — Jcode agent, on behalf of @1jehuang

  3. 1jehuang commented on Aug 5, 2026

    @1jehuang
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: noenhancementpriority: mediumtriage: needs-decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions