@agentclientprotocol/claude-agent-acp 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,12 +12,24 @@ This tool implements an ACP agent by using the official [Claude Agent SDK](https
12
12
  - Following
13
13
  - Edit review
14
14
  - TODO lists
15
+ - Nested subagent transcripts
15
16
  - Interactive (and background) terminals
16
17
  - Custom [Slash commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands)
17
18
  - Client MCP servers
18
19
 
19
20
  Learn more about the [Agent Client Protocol](https://agentclientprotocol.com/).
20
21
 
22
+ ### Nested subagent transcripts
23
+
24
+ ACP 1.2 has no standard subagent tool kind or nested-message relationship. Clients that can render
25
+ nested transcripts can opt in with `clientCapabilities._meta["subagent-transcript"] = true`.
26
+ The agent then forwards subagent text, thinking, and tool calls, relating nested updates to the
27
+ launching Agent/Task call through `_meta.claudeCode.parentToolUseId`. Agent/Task calls are marked
28
+ with `_meta.claudeCode.subagent = true`.
29
+
30
+ Clients that do not advertise the capability retain the legacy flattened behavior. In both modes,
31
+ the normal Agent/Task tool result is preserved as the protocol-compatible fallback.
32
+
21
33
  ## Contribution Policy
22
34
 
23
35
  This project does not require a Contributor License Agreement (CLA). Instead, contributions are accepted under the following terms:
@@ -1,5 +1,5 @@
1
1
  import { AuthenticateRequest, CancelNotification, ClientCapabilities, CompleteElicitationNotification, CreateElicitationRequest, CreateElicitationResponse, DisableProviderRequest, DisableProviderResponse, ForkSessionRequest, ForkSessionResponse, InitializeRequest, InitializeResponse, ListProvidersRequest, ListProvidersResponse, LlmProtocol, ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse, LogoutRequest, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, ReadTextFileRequest, ReadTextFileResponse, SetProviderRequest, SetProviderResponse, RequestPermissionRequest, RequestPermissionResponse, ResumeSessionRequest, ResumeSessionResponse, SessionConfigOption, SessionModeState, SessionNotification, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse, CloseSessionRequest, CloseSessionResponse, DeleteSessionRequest, DeleteSessionResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk";
2
- import { AgentInfo, CanUseTool, FastModeState, ModelInfo, Options, PermissionMode, PermissionUpdate, Query, SDKMessageOrigin, SDKPartialAssistantMessage, SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
2
+ import { AgentInfo, CanUseTool, FastModeDisabledReason, FastModeState, ModelInfo, Options, PermissionMode, PermissionUpdate, Query, SDKMessageOrigin, SDKPartialAssistantMessage, SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
3
3
  import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
4
4
  import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
5
5
  import { SettingsManager } from "./settings.js";
@@ -19,6 +19,14 @@ type AccumulatedUsage = {
19
19
  cachedReadTokens: number;
20
20
  cachedWriteTokens: number;
21
21
  };
22
+ /** Request-level steering options. `promptRequired` is opt-in so existing Hosts
23
+ * keep the established idle fallback behavior. */
24
+ type SteerMeta = {
25
+ [key: string]: unknown;
26
+ steering?: {
27
+ idleBehavior?: "promptRequired";
28
+ };
29
+ };
22
30
  /** Params of a {@link STEER_METHOD} request. Shaped like the relevant subset of
23
31
  * a `PromptRequest` so the same `promptToClaude` conversion applies. Delivery
24
32
  * priority is deliberately NOT exposed here — it's an internal detail the agent
@@ -26,20 +34,18 @@ type AccumulatedUsage = {
26
34
  export type SteerRequest = {
27
35
  sessionId: string;
28
36
  prompt: PromptRequest["prompt"];
37
+ _meta?: SteerMeta | null;
29
38
  };
30
- /** Where a steering message was accepted, per the wire protocol's two
31
- * successful outcomes:
32
- * - `injected`: a turn was still running and the message was applied to it;
33
- * - `startedNewTurn`: the turn we meant to steer had already finished (an
34
- * unavoidable race), so the message began a fresh turn instead of being
35
- * dropped.
36
- * Both are success results — never a JSON-RPC error — and tell the client
37
- * where the message landed. */
38
- type SteerOutcome = "injected" | "startedNewTurn";
39
- /** Result of a {@link STEER_METHOD} request: the single required `outcome`
40
- * field the client reads to learn where its steering message was accepted. */
39
+ /** Result of a {@link STEER_METHOD} request. The legacy `startedNewTurn` result
40
+ * remains the default idle behavior; `promptRequired` is returned only when the
41
+ * Host explicitly opts into the host-owned fallback in request `_meta`. */
41
42
  export type SteerResponse = {
42
- outcome: SteerOutcome;
43
+ outcome: "injected";
44
+ } | {
45
+ outcome: "startedNewTurn";
46
+ } | {
47
+ outcome: "promptRequired";
48
+ reason: "noRunningTurn";
43
49
  };
44
50
  /** Internal model-selection state. Mirrors the shape the ACP SDK exposed as
45
51
  * `SessionModelState` before model selection moved entirely into
@@ -229,6 +235,13 @@ type Session = {
229
235
  * user's intent so it persists across model switches; the Fast mode config
230
236
  * option is only surfaced while the selected model supports it. */
231
237
  fastModeEnabled: boolean;
238
+ /** Why the SDK currently can't serve Fast mode, when the reason is one worth
239
+ * telling the user about (see {@link FAST_MODE_UNAVAILABLE_EXPLANATIONS} —
240
+ * routine states like the SDK's own opt-in requirement normalize to
241
+ * `undefined`). Refreshed from every `fast_mode_disabled_reason` the SDK
242
+ * reports on `system`/init and user-turn `result`s; surfaced in the Fast mode
243
+ * option's description so a toggle that snaps back off explains itself. */
244
+ fastModeDisabledReason?: FastModeDisabledReason;
232
245
  abortController: AbortController;
233
246
  /** Signal the consumer races `query.next()` against. Aborted by cancel()
234
247
  * (after a grace period) to force the active turn to settle "cancelled" when
@@ -242,6 +255,9 @@ type Session = {
242
255
  * cancel. */
243
256
  forceCancelTimer?: ReturnType<typeof setTimeout>;
244
257
  emitRawSDKMessages: boolean | SDKMessageFilter[];
258
+ /** Whether nested subagent text/thinking is forwarded to the ACP client.
259
+ * Enabled by either the ACP capability or the pre-existing SDK option. */
260
+ forwardSubagentText: boolean;
245
261
  /** Context window size of the session's current model, carried across
246
262
  * prompts so mid-stream usage_update notifications report a correct `size`
247
263
  * before the turn's first result message arrives. Seeded synchronously at
@@ -496,10 +512,12 @@ type ProviderConfig = {
496
512
  export type ToolUpdateMeta = {
497
513
  claudeCode?: {
498
514
  toolName: string;
515
+ title?: string;
499
516
  toolResponse?: unknown;
500
517
  parentToolUseId?: string;
501
518
  nonExecutionKind?: string;
502
519
  userFeedback?: string;
520
+ subagent?: true;
503
521
  };
504
522
  terminal_info?: {
505
523
  terminal_id: string;
@@ -658,11 +676,10 @@ export declare class ClaudeAcpAgent {
658
676
  resolveProviderConfig(): ProviderConfig | null;
659
677
  logout(_params: LogoutRequest): Promise<void>;
660
678
  prompt(params: PromptRequest): Promise<PromptResponse>;
661
- /** Steer the session per the ACP steering wire protocol: apply a follow-up
662
- * message to the turn that is currently running, or — if that turn already
663
- * finished — start a fresh turn with it. Never drops the message and never
664
- * returns a JSON-RPC error for the "arrived too late" race; both paths are
665
- * success outcomes (see {@link SteerOutcome}).
679
+ /** Steer the session per the ACP steering wire protocol: inject a follow-up
680
+ * message into the turn that is currently running. If that turn already
681
+ * settled, the established default starts a new detached turn; Hosts may opt
682
+ * into the host-owned `promptRequired` fallback through request `_meta`.
666
683
  *
667
684
  * When a turn is in flight this injects (returns `injected`): unlike
668
685
  * `prompt()`, it does NOT create a Turn or enqueue on `turnQueue`; it pushes
@@ -675,12 +692,11 @@ export declare class ClaudeAcpAgent {
675
692
  * calls). The steered message's own output streams via `session/update`, not
676
693
  * this response.
677
694
  *
678
- * When the session is idle (no unsettled turn — the turn we meant to steer
679
- * raced ahead and finished), this starts a normal new turn with the message
680
- * and returns `startedNewTurn`. That turn is fire-and-forget from the steer
681
- * request's view: its `PromptResponse` and output flow through the usual
682
- * `prompt()`/`session/update` path, so we return the outcome immediately
683
- * rather than awaiting turn completion. */
695
+ * When the session is idle, the opt-in path returns `promptRequired` WITHOUT
696
+ * calling `prompt()`, pushing SDK input, or mutating `turnQueue`: the content
697
+ * stays Host-owned so the Host can submit it through a standard
698
+ * `session/prompt`. Without the opt-in, the existing detached `prompt()` and
699
+ * `startedNewTurn` result are preserved for compatibility. */
684
700
  steer(params: SteerRequest): Promise<SteerResponse>;
685
701
  /** Lazily start the per-session consumer that drains the SDK query stream for
686
702
  * the session's whole life. Idempotent: only the first `prompt()` starts it. */
@@ -819,7 +835,14 @@ export declare class ClaudeAcpAgent {
819
835
  * here).
820
836
  * - `cooldown`: a transient suspension of an already-enabled fast mode.
821
837
  * Leave the toggle as-is rather than flapping it — and never let a stray
822
- * cooldown spuriously enable a toggle the user has off. */
838
+ * cooldown spuriously enable a toggle the user has off.
839
+ *
840
+ * `reason` is the SDK's `fast_mode_disabled_reason`, reported alongside the
841
+ * state. Only explainable reasons are retained (see
842
+ * {@link normalizeFastModeDisabledReason}), so the comparison below tracks
843
+ * exactly what the user can see: a routine `sdk_opt_in_required` report on
844
+ * every turn's result can't churn the option, while a real blocker updates
845
+ * the description even when the toggle's own value is unchanged. */
823
846
  private syncFastModeState;
824
847
  private getOrCreateSession;
825
848
  /**
@@ -856,6 +879,12 @@ export declare const FAST_MODE_OFF = "off";
856
879
  * docs) keeps the toggle on so it reflects the user's intent — only an
857
880
  * explicit `off` clears it. */
858
881
  export declare function fastModeStateEnabled(state: FastModeState): boolean;
882
+ /** Normalize an SDK-reported `fast_mode_disabled_reason` to the one we retain:
883
+ * a reason we have an explanation for, else `undefined`. Keeping only
884
+ * explainable reasons means state comparisons (see `syncFastModeState`) track
885
+ * exactly what the user can see, so routine reports like
886
+ * `sdk_opt_in_required` never churn the config option. */
887
+ export declare function normalizeFastModeDisabledReason(reason: FastModeDisabledReason | undefined): FastModeDisabledReason | undefined;
859
888
  /** Whether the Client advertised support for boolean session config options
860
889
  * (`session.configOptions.boolean`). Agents MUST only send `type: "boolean"`
861
890
  * config options to Clients that opt in; otherwise we fall back to a `select`.
@@ -864,8 +893,14 @@ export declare function clientSupportsBooleanConfigOptions(clientCapabilities?:
864
893
  /** Build the Fast mode config option. When the Client supports boolean config
865
894
  * options we expose a native `type: "boolean"` toggle; otherwise we degrade to
866
895
  * a two-value `select` ("on"/"off") so older Clients still get a usable
867
- * control. */
868
- export declare function createFastModeConfigOption(enabled: boolean, useBooleanOption: boolean): SessionConfigOption;
896
+ * control.
897
+ *
898
+ * `disabledReason` (the SDK's `fast_mode_disabled_reason`) is folded into the
899
+ * description while the toggle reads off, so a user whose account or provider
900
+ * can't serve Fast mode sees why instead of a switch that silently refuses to
901
+ * stay on. Ignored while enabled: a reason reported alongside an `on`/`cooldown`
902
+ * state isn't blocking anything right now. */
903
+ export declare function createFastModeConfigOption(enabled: boolean, useBooleanOption: boolean, disabledReason?: FastModeDisabledReason): SessionConfigOption;
869
904
  /** Resolve the requested Fast mode value from a `session/set_config_option`
870
905
  * request. Accepts a native boolean (boolean-capable Clients) or the
871
906
  * "on"/"off" select-fallback strings. */
@@ -877,6 +912,9 @@ export type FastModeOptionState = {
877
912
  enabled: boolean;
878
913
  /** Whether the Client opted into boolean config options. */
879
914
  useBooleanOption: boolean;
915
+ /** Latest explainable `fast_mode_disabled_reason`, folded into the option's
916
+ * description while the toggle reads off. */
917
+ disabledReason?: FastModeDisabledReason;
880
918
  };
881
919
  export declare function buildConfigOptions(modes: SessionModeState, models: SessionModelState, modelInfos: ModelInfo[], currentEffortLevel?: string, agents?: AgentInfo[], currentAgent?: string, fastMode?: FastModeOptionState): SessionConfigOption[];
882
920
  export declare function resolveModelPreference(models: ModelInfo[], preference: string): ModelInfo | null;
@@ -1 +1 @@
1
- {"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../src/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAGnB,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,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AAY,EAAE,YAAY,EAC1B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,GACA,mBAAmB,EAAE,CAgIvB;AAED;;;;;;;;;;;oEAWoE;AACpE,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAC3D,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC,CAczB;AAED,wBAAgB,MAAM;;;EA2CrB"}
package/dist/acp-agent.js CHANGED
@@ -68,16 +68,24 @@ function parseSteerRequest(params) {
68
68
  if (!params || typeof params !== "object") {
69
69
  throw RequestError.invalidParams(undefined, "steer params must be an object");
70
70
  }
71
- const { sessionId, prompt } = params;
71
+ const { sessionId, prompt, _meta } = params;
72
72
  if (typeof sessionId !== "string" || sessionId.length === 0) {
73
73
  throw RequestError.invalidParams(undefined, "steer params require a non-empty sessionId");
74
74
  }
75
75
  if (!Array.isArray(prompt) || prompt.length === 0) {
76
76
  throw RequestError.invalidParams(undefined, "steer params require a non-empty prompt array");
77
77
  }
78
+ const steering = _meta && typeof _meta === "object" ? _meta.steering : undefined;
79
+ const idleBehavior = steering && typeof steering === "object"
80
+ ? steering.idleBehavior
81
+ : undefined;
82
+ if (idleBehavior !== undefined && idleBehavior !== "promptRequired") {
83
+ throw RequestError.invalidParams(undefined, "unsupported steering idleBehavior");
84
+ }
78
85
  return {
79
86
  sessionId,
80
87
  prompt: prompt,
88
+ _meta: _meta,
81
89
  };
82
90
  }
83
91
  /** Result-message origin kinds that mark an AUTONOMOUS cycle — work the
@@ -140,6 +148,23 @@ const PROVIDER_ID = "main";
140
148
  * env-var mappings understood by {@link createEnvForProvider}.
141
149
  */
142
150
  const SUPPORTED_PROTOCOLS = ["anthropic", "bedrock", "vertex"];
151
+ const SUBAGENT_TRANSCRIPT_CAPABILITY = "subagent-transcript";
152
+ function supportsSubagentTranscript(capabilities) {
153
+ return capabilities?._meta?.[SUBAGENT_TRANSCRIPT_CAPABILITY] === true;
154
+ }
155
+ function parentToolUseIdOf(message) {
156
+ if (!("parent_tool_use_id" in message))
157
+ return null;
158
+ return typeof message.parent_tool_use_id === "string" ? message.parent_tool_use_id : null;
159
+ }
160
+ function stripSubagentTextAndThinking(content) {
161
+ if (!Array.isArray(content))
162
+ return content;
163
+ return content.filter((item) => !item ||
164
+ typeof item !== "object" ||
165
+ !("type" in item) ||
166
+ (item.type !== "text" && item.type !== "thinking"));
167
+ }
143
168
  /**
144
169
  * Advance the lexer state across the fragment appended since the last delta:
145
170
  * just enough JSON awareness (string/escape, nesting depth) to spot commas
@@ -628,10 +653,9 @@ export class ClaudeAcpAgent {
628
653
  ...terminalAuthMethods,
629
654
  ...(supportsGatewayAuth ? [gatewayAuthMethod, gatewayBedrockAuthMethod] : []),
630
655
  ],
631
- // Top-level `_meta` (sibling of `agentCapabilities`), per the ACP steering
632
- // wire protocol: advertises the `_session/steering` extension request so
633
- // clients know they may inject a follow-up into the running turn (see
634
- // STEER_METHOD) instead of queuing it as a separate `session/prompt`.
656
+ // Top-level `_meta` (sibling of `agentCapabilities`), per the existing ACP
657
+ // steering extension contract: advertises the `_session/steering` request
658
+ // so clients know they may inject a follow-up into a running turn.
635
659
  _meta: {
636
660
  steering: {
637
661
  supported: true,
@@ -888,11 +912,10 @@ export class ClaudeAcpAgent {
888
912
  this.ensureConsumer(session, params.sessionId);
889
913
  return response;
890
914
  }
891
- /** Steer the session per the ACP steering wire protocol: apply a follow-up
892
- * message to the turn that is currently running, or — if that turn already
893
- * finished — start a fresh turn with it. Never drops the message and never
894
- * returns a JSON-RPC error for the "arrived too late" race; both paths are
895
- * success outcomes (see {@link SteerOutcome}).
915
+ /** Steer the session per the ACP steering wire protocol: inject a follow-up
916
+ * message into the turn that is currently running. If that turn already
917
+ * settled, the established default starts a new detached turn; Hosts may opt
918
+ * into the host-owned `promptRequired` fallback through request `_meta`.
896
919
  *
897
920
  * When a turn is in flight this injects (returns `injected`): unlike
898
921
  * `prompt()`, it does NOT create a Turn or enqueue on `turnQueue`; it pushes
@@ -905,15 +928,13 @@ export class ClaudeAcpAgent {
905
928
  * calls). The steered message's own output streams via `session/update`, not
906
929
  * this response.
907
930
  *
908
- * When the session is idle (no unsettled turn — the turn we meant to steer
909
- * raced ahead and finished), this starts a normal new turn with the message
910
- * and returns `startedNewTurn`. That turn is fire-and-forget from the steer
911
- * request's view: its `PromptResponse` and output flow through the usual
912
- * `prompt()`/`session/update` path, so we return the outcome immediately
913
- * rather than awaiting turn completion. */
931
+ * When the session is idle, the opt-in path returns `promptRequired` WITHOUT
932
+ * calling `prompt()`, pushing SDK input, or mutating `turnQueue`: the content
933
+ * stays Host-owned so the Host can submit it through a standard
934
+ * `session/prompt`. Without the opt-in, the existing detached `prompt()` and
935
+ * `startedNewTurn` result are preserved for compatibility. */
914
936
  async steer(params) {
915
937
  const sessionId = params.sessionId;
916
- const prompt = params.prompt;
917
938
  const session = this.sessions[sessionId];
918
939
  if (!session) {
919
940
  throw new Error("Session not found");
@@ -923,24 +944,31 @@ export class ClaudeAcpAgent {
923
944
  }
924
945
  // "A turn is running" = the queue holds an unsettled turn. This covers both
925
946
  // the activated turn and one just submitted but not yet echoed/activated,
926
- // which is exactly the window in which steering is meaningful.
927
- const turnInFlight = (session.turnQueue ?? []).some((t) => !t.settled);
928
- const promptRequest = {
929
- sessionId: sessionId,
930
- prompt: prompt,
931
- };
947
+ // which is exactly the window in which steering is meaningful. This check
948
+ // and the active-path push below stay in one synchronous section so the
949
+ // turn cannot settle in the gap between deciding to inject and enqueueing.
950
+ const turnInFlight = (session.turnQueue ?? []).some((turn) => !turn.settled);
932
951
  if (!turnInFlight) {
933
- // Race: the turn we meant to steer already finished. Per the protocol the
934
- // message must not be dropped nor surfaced as an error — start a fresh
935
- // turn with it. Don't await: the new turn streams via session/update and
936
- // its PromptResponse is consumed by the normal prompt() path; we only owe
937
- // the client the outcome. `.catch` keeps the detached promise from
938
- // becoming an unhandled rejection.
952
+ const promptRequest = {
953
+ sessionId,
954
+ prompt: params.prompt,
955
+ };
956
+ if (params._meta?.steering?.idleBehavior === "promptRequired") {
957
+ // The opt-in path leaves the content untouched so the Host can retry via
958
+ // a normal session/prompt whose lifecycle owns the continuation result.
959
+ return { outcome: "promptRequired", reason: "noRunningTurn" };
960
+ }
961
+ // Preserve the established default for Hosts that do not opt in. This is
962
+ // intentionally detached for compatibility with the existing contract.
939
963
  this.prompt(promptRequest).catch((error) => {
940
964
  this.logger.error(`Session ${sessionId}: steered new turn failed: ${error}`);
941
965
  });
942
966
  return { outcome: "startedNewTurn" };
943
967
  }
968
+ const promptRequest = {
969
+ sessionId,
970
+ prompt: params.prompt,
971
+ };
944
972
  const userMessage = promptToClaude(promptRequest);
945
973
  userMessage.uuid = randomUUID();
946
974
  // Deliver into the running turn rather than queuing behind it as a fresh
@@ -1583,7 +1611,7 @@ export class ClaudeAcpAgent {
1583
1611
  // A fresh `system`/init (e.g. after reinitialize) can carry an
1584
1612
  // updated Fast mode state; reconcile it with what we seeded at
1585
1613
  // session creation.
1586
- await this.syncFastModeState(message.session_id, session, message.fast_mode_state);
1614
+ await this.syncFastModeState(message.session_id, session, message.fast_mode_state, message.fast_mode_disabled_reason);
1587
1615
  break;
1588
1616
  case "status": {
1589
1617
  // These banners count as delivered text (via sendUpdate), so
@@ -1828,6 +1856,28 @@ export class ClaudeAcpAgent {
1828
1856
  // already emitted as a `tool_call`, so mark it failed with the
1829
1857
  // rejection reason — otherwise the client shows a tool call
1830
1858
  // that silently never resolves.
1859
+ //
1860
+ // The id is the executing call's own, and the frame lands
1861
+ // between its `tool_use` and its `tool_result` (the SDK enqueues
1862
+ // it from inside canUseTool), so the call is normally in flight
1863
+ // here. Not always: the assistant message carrying the tool_use
1864
+ // is dropped by the cancelled-turn guard below, and a denial for
1865
+ // it can still arrive afterwards — the case the `tool_result`
1866
+ // fallback in `toAcpNotifications` gates on `wasEmitted` for.
1867
+ // Drop the update rather than reference a tool call the client
1868
+ // was never given (see `ensureToolCallEmitted`, issue #851).
1869
+ if (!session.emittedToolCalls.has(message.tool_use_id)) {
1870
+ break;
1871
+ }
1872
+ // A denial inside a subagent identifies the subagent by
1873
+ // `agent_id` (as canUseTool does with `agentID`), never by the
1874
+ // Agent/Task call that spawned it. Resolve it the same way so
1875
+ // the update lands in the subagent's transcript alongside the
1876
+ // `tool_call` it resolves, which carries the parent stamped from
1877
+ // `parent_tool_use_id` (see `liveBackgroundTasks`).
1878
+ const parentToolUseId = message.agent_id
1879
+ ? session.liveBackgroundTasks.get(message.agent_id)?.parentToolUseId
1880
+ : undefined;
1831
1881
  const reason = message.decision_reason ?? message.message;
1832
1882
  await sendUpdate({
1833
1883
  sessionId: message.session_id,
@@ -1844,6 +1894,7 @@ export class ClaudeAcpAgent {
1844
1894
  _meta: {
1845
1895
  claudeCode: {
1846
1896
  toolName: message.tool_name,
1897
+ ...(parentToolUseId ? { parentToolUseId } : {}),
1847
1898
  toolResponse: {
1848
1899
  decisionReasonType: message.decision_reason_type,
1849
1900
  decisionReason: message.decision_reason,
@@ -2077,7 +2128,7 @@ export class ClaudeAcpAgent {
2077
2128
  // an autonomous cycle's state lands on the next user turn's
2078
2129
  // result. Runs even when the turn errors or was cancelled.
2079
2130
  if (!isAutonomousResult) {
2080
- await this.syncFastModeState(params.sessionId, session, message.fast_mode_state);
2131
+ await this.syncFastModeState(params.sessionId, session, message.fast_mode_state, message.fast_mode_disabled_reason);
2081
2132
  }
2082
2133
  // A user-turn result needs an active turn so its stop reason is
2083
2134
  // attributed and the turn settles at idle. Local-only commands carry
@@ -2691,11 +2742,13 @@ export class ClaudeAcpAgent {
2691
2742
  // the record stays bounded to the in-flight message.
2692
2743
  streamedBlocks.length = 0;
2693
2744
  }
2694
- else if (message.type === "assistant") {
2695
- // Subagent assistant message (`parent_tool_use_id !== null`). It is
2696
- // never streamed live and its text/thinking is internal to the tool
2697
- // call — keep dropping it so subagent prose doesn't leak into the
2698
- // top-level feed.
2745
+ else if (message.type === "assistant" &&
2746
+ !(session.forwardSubagentText || supportsSubagentTranscript(this.clientCapabilities))) {
2747
+ // Legacy clients don't understand nested transcripts. Keep the
2748
+ // historical behavior for them: subagent text/thinking remains
2749
+ // internal to the tool call instead of leaking into the top-level
2750
+ // feed. Capable clients opt into the branch above unchanged, with
2751
+ // `parentToolUseId` stamped by toAcpNotifications.
2699
2752
  content = message.message.content.filter((item) => item.type !== "text" && item.type !== "thinking");
2700
2753
  }
2701
2754
  else {
@@ -2724,11 +2777,30 @@ export class ClaudeAcpAgent {
2724
2777
  break;
2725
2778
  }
2726
2779
  case "tool_progress": {
2780
+ // Not every beat reports under the id of a tool call the client has
2781
+ // seen: heartbeats derive `<tool_use_id>-heartbeat-<n>`, and the
2782
+ // `agent_api_retry` beats behind `subagentRetry` report under
2783
+ // `agent_<assistant_message_id>`. Forwarding those verbatim leaves the
2784
+ // client resolving an id it has never been told about (the same trap
2785
+ // `ensureToolCallEmitted` documents for #851). The SDK stamps
2786
+ // `parent_tool_use_id` with the executing tool's real id whenever the
2787
+ // beat doesn't carry one of its own, so fall back to it rather than
2788
+ // pattern-matching each synthetic id shape. Beats that do report a real
2789
+ // id (a subagent's `bash_progress`, whose parent is the spawning Agent
2790
+ // call) keep resolving to that id.
2791
+ const toolCallId = session.emittedToolCalls.has(message.tool_use_id)
2792
+ ? message.tool_use_id
2793
+ : message.parent_tool_use_id;
2794
+ // Ids leave `emittedToolCalls` at `tool_result`, so this also stops a
2795
+ // beat that races past completion from reopening a finished call.
2796
+ if (toolCallId === null || !session.emittedToolCalls.has(toolCallId)) {
2797
+ break;
2798
+ }
2727
2799
  await sendUpdate({
2728
2800
  sessionId: message.session_id,
2729
2801
  update: {
2730
2802
  sessionUpdate: "tool_call_update",
2731
- toolCallId: message.tool_use_id,
2803
+ toolCallId,
2732
2804
  status: "in_progress",
2733
2805
  _meta: {
2734
2806
  claudeCode: {
@@ -3239,6 +3311,8 @@ export class ClaudeAcpAgent {
3239
3311
  async replaySessionHistory(sessionId) {
3240
3312
  const toolUseCache = {};
3241
3313
  const messages = await getSessionMessages(sessionId);
3314
+ const forwardSubagentText = this.sessions[sessionId]?.forwardSubagentText ??
3315
+ supportsSubagentTranscript(this.clientCapabilities);
3242
3316
  for (const message of messages) {
3243
3317
  // Backfill the ACP messageId -> SDK uuid mapping for messages we didn't
3244
3318
  // observe live (resumed/loaded sessions), so rewind/resume can translate
@@ -3257,6 +3331,10 @@ export class ClaudeAcpAgent {
3257
3331
  }
3258
3332
  // @ts-expect-error - untyped in SDK but we handle all of these
3259
3333
  let content = message.message.content;
3334
+ const parentToolUseId = parentToolUseIdOf(message);
3335
+ if (message.type === "assistant" && parentToolUseId && !forwardSubagentText) {
3336
+ content = stripSubagentTextAndThinking(content);
3337
+ }
3260
3338
  // @ts-expect-error - untyped in SDK but we handle all of these
3261
3339
  if (message.message.role === "user") {
3262
3340
  content = stripLocalCommandMetadata(content);
@@ -3273,6 +3351,7 @@ export class ClaudeAcpAgent {
3273
3351
  cwd: this.sessions[sessionId]?.cwd,
3274
3352
  taskState: this.sessions[sessionId]?.taskState,
3275
3353
  messageId: replayMessageId,
3354
+ parentToolUseId,
3276
3355
  })) {
3277
3356
  await this.client.sessionUpdate(notification);
3278
3357
  }
@@ -3719,6 +3798,13 @@ export class ClaudeAcpAgent {
3719
3798
  else {
3720
3799
  session.modes = { ...session.modes, availableModes: newAvailableModes };
3721
3800
  }
3801
+ // `model_not_allowed` described the model we just left, so it must not
3802
+ // follow us onto the new one; the remaining reasons are account- or
3803
+ // environment-scoped and stay true across a switch. Either way the next
3804
+ // init/result report refreshes this.
3805
+ if (session.fastModeDisabledReason === "model_not_allowed") {
3806
+ session.fastModeDisabledReason = undefined;
3807
+ }
3722
3808
  // Rebuild config options since effort levels depend on the selected model
3723
3809
  const effortOpt = session.configOptions.find((o) => o.id === EFFORT_CONFIG_ID);
3724
3810
  const currentEffort = typeof effortOpt?.currentValue === "string" ? effortOpt.currentValue : undefined;
@@ -3729,6 +3815,7 @@ export class ClaudeAcpAgent {
3729
3815
  supported: newModelInfo?.supportsFastMode ?? false,
3730
3816
  enabled: session.fastModeEnabled,
3731
3817
  useBooleanOption: clientSupportsBooleanConfigOptions(this.clientCapabilities),
3818
+ disabledReason: session.fastModeDisabledReason,
3732
3819
  });
3733
3820
  // Sync effort with the SDK if it changed after the model switch
3734
3821
  const newEffortOpt = session.configOptions.find((o) => o.id === EFFORT_CONFIG_ID);
@@ -3810,7 +3897,7 @@ export class ClaudeAcpAgent {
3810
3897
  * option isn't present, so callers must confirm the current model surfaces
3811
3898
  * it first. */
3812
3899
  refreshFastModeOption(session, enabled) {
3813
- const refreshed = createFastModeConfigOption(enabled, clientSupportsBooleanConfigOptions(this.clientCapabilities));
3900
+ const refreshed = createFastModeConfigOption(enabled, clientSupportsBooleanConfigOptions(this.clientCapabilities), session.fastModeDisabledReason);
3814
3901
  session.configOptions = session.configOptions.map((o) => o.id === FAST_MODE_CONFIG_ID ? refreshed : o);
3815
3902
  }
3816
3903
  /** Toggle Fast mode for a session: push the SDK flag, record the user's
@@ -3839,8 +3926,15 @@ export class ClaudeAcpAgent {
3839
3926
  * here).
3840
3927
  * - `cooldown`: a transient suspension of an already-enabled fast mode.
3841
3928
  * Leave the toggle as-is rather than flapping it — and never let a stray
3842
- * cooldown spuriously enable a toggle the user has off. */
3843
- async syncFastModeState(sessionId, session, state) {
3929
+ * cooldown spuriously enable a toggle the user has off.
3930
+ *
3931
+ * `reason` is the SDK's `fast_mode_disabled_reason`, reported alongside the
3932
+ * state. Only explainable reasons are retained (see
3933
+ * {@link normalizeFastModeDisabledReason}), so the comparison below tracks
3934
+ * exactly what the user can see: a routine `sdk_opt_in_required` report on
3935
+ * every turn's result can't churn the option, while a real blocker updates
3936
+ * the description even when the toggle's own value is unchanged. */
3937
+ async syncFastModeState(sessionId, session, state, reason) {
3844
3938
  if (state === undefined) {
3845
3939
  return;
3846
3940
  }
@@ -3851,11 +3945,31 @@ export class ClaudeAcpAgent {
3851
3945
  return;
3852
3946
  }
3853
3947
  const enabled = state === "on";
3854
- if (enabled === session.fastModeEnabled) {
3948
+ // A reason only describes an off state; drop any that rides an `on` report
3949
+ // so it can't decorate the option the next time fast mode goes off.
3950
+ const nextReason = enabled ? undefined : normalizeFastModeDisabledReason(reason);
3951
+ if (enabled === session.fastModeEnabled && nextReason === session.fastModeDisabledReason) {
3855
3952
  return;
3856
3953
  }
3954
+ // The user asked for Fast mode and the SDK is telling us it can't serve it.
3955
+ // The description carries the same explanation, but a toggle silently
3956
+ // snapping back is the case worth saying out loud once, at the flip.
3957
+ const explain = session.fastModeEnabled && !enabled && nextReason !== undefined;
3857
3958
  session.fastModeEnabled = enabled;
3959
+ session.fastModeDisabledReason = nextReason;
3858
3960
  this.refreshFastModeOption(session, enabled);
3961
+ if (explain) {
3962
+ await this.client.sessionUpdate({
3963
+ sessionId,
3964
+ update: {
3965
+ sessionUpdate: "agent_message_chunk",
3966
+ content: {
3967
+ type: "text",
3968
+ text: `**Fast mode turned off:** ${FAST_MODE_UNAVAILABLE_EXPLANATIONS[nextReason]}.`,
3969
+ },
3970
+ },
3971
+ });
3972
+ }
3859
3973
  await this.client.sessionUpdate({
3860
3974
  sessionId,
3861
3975
  update: {
@@ -3987,6 +4101,8 @@ export class ClaudeAcpAgent {
3987
4101
  // Extract options from _meta if provided
3988
4102
  const sessionMeta = params._meta;
3989
4103
  const userProvidedOptions = sessionMeta?.claudeCode?.options;
4104
+ const forwardSubagentText = supportsSubagentTranscript(this.clientCapabilities) ||
4105
+ userProvidedOptions?.forwardSubagentText === true;
3990
4106
  // Configure thinking behavior from environment variable
3991
4107
  const thinking = resolveThinkingConfig(process.env.MAX_THINKING_TOKENS, this.logger);
3992
4108
  // Parse model configuration from environment (e.g. Bedrock model overrides)
@@ -4055,6 +4171,7 @@ export class ClaudeAcpAgent {
4055
4171
  // Override certain fields that must be controlled by ACP
4056
4172
  cwd: params.cwd,
4057
4173
  includePartialMessages: true,
4174
+ forwardSubagentText,
4058
4175
  mcpServers: { ...(userProvidedOptions?.mcpServers || {}), ...mcpServers },
4059
4176
  // If we want bypassPermissions to be an option, we have to allow it here.
4060
4177
  // But it doesn't work in root mode, so we only activate it if it will work.
@@ -4283,10 +4400,18 @@ export class ClaudeAcpAgent {
4283
4400
  // the resolved model advertises `supportsFastMode`.
4284
4401
  const fastModeEnabled = initializationResult.fast_mode_state !== undefined &&
4285
4402
  fastModeStateEnabled(initializationResult.fast_mode_state);
4403
+ // `fast_mode_disabled_reason` reflects the post-switch model since SDK
4404
+ // 0.3.219 (the initialize response used to answer from the spawn-time
4405
+ // model). A fresh SDK session reports `sdk_opt_in_required` — the toggle IS
4406
+ // the opt-in — which normalizes away, so only real blockers are retained.
4407
+ const fastModeDisabledReason = fastModeEnabled
4408
+ ? undefined
4409
+ : normalizeFastModeDisabledReason(initializationResult.fast_mode_disabled_reason);
4286
4410
  const fastMode = {
4287
4411
  supported: currentModelInfo?.supportsFastMode ?? false,
4288
4412
  enabled: fastModeEnabled,
4289
4413
  useBooleanOption: clientSupportsBooleanConfigOptions(this.clientCapabilities),
4414
+ disabledReason: fastModeDisabledReason,
4290
4415
  };
4291
4416
  const configOptions = buildConfigOptions(modes, models, modelInfos, settingsManager.getSettings().effortLevel, agents, currentAgent, fastMode);
4292
4417
  // Apply the initial effort level to the SDK so it matches the UI default
@@ -4348,8 +4473,10 @@ export class ClaudeAcpAgent {
4348
4473
  agents,
4349
4474
  currentAgent,
4350
4475
  fastModeEnabled,
4476
+ fastModeDisabledReason,
4351
4477
  abortController,
4352
4478
  emitRawSDKMessages: sessionMeta?.claudeCode?.emitRawSDKMessages ?? false,
4479
+ forwardSubagentText,
4353
4480
  contextWindowSize: seededWindow.size,
4354
4481
  contextWindowAuthoritative: seededWindow.authoritative,
4355
4482
  providerCacheKey,
@@ -4607,6 +4734,32 @@ const FAST_MODE_DESCRIPTION = "Faster responses on supported models";
4607
4734
  export function fastModeStateEnabled(state) {
4608
4735
  return state !== "off";
4609
4736
  }
4737
+ /** User-facing explanations for the SDK's `fast_mode_disabled_reason` values
4738
+ * that a user can act on (or at least wants to know about). Deliberately
4739
+ * partial — the omitted reasons are not worth surfacing:
4740
+ * - `sdk_opt_in_required`: every SDK session starts here (the toggle IS the
4741
+ * opt-in), so it describes the default, not a problem.
4742
+ * - `preference`: the user turned Fast mode off themselves.
4743
+ * - `pending`: eligibility is still resolving; the next report supersedes it.
4744
+ * - `unknown`: nothing meaningful to say.
4745
+ * Unknown future reasons fall through the same way (open set — the SDK's docs
4746
+ * say to ignore values you don't handle). */
4747
+ const FAST_MODE_UNAVAILABLE_EXPLANATIONS = {
4748
+ free: "not available on the free plan",
4749
+ extra_usage_disabled: "requires extra usage to be enabled for this account",
4750
+ model_not_allowed: "not available for the selected model",
4751
+ not_first_party: "not available on this API provider",
4752
+ disabled_by_env: "disabled by environment configuration",
4753
+ network_error: "eligibility could not be verified (network error)",
4754
+ };
4755
+ /** Normalize an SDK-reported `fast_mode_disabled_reason` to the one we retain:
4756
+ * a reason we have an explanation for, else `undefined`. Keeping only
4757
+ * explainable reasons means state comparisons (see `syncFastModeState`) track
4758
+ * exactly what the user can see, so routine reports like
4759
+ * `sdk_opt_in_required` never churn the config option. */
4760
+ export function normalizeFastModeDisabledReason(reason) {
4761
+ return reason && FAST_MODE_UNAVAILABLE_EXPLANATIONS[reason] ? reason : undefined;
4762
+ }
4610
4763
  /** Whether the Client advertised support for boolean session config options
4611
4764
  * (`session.configOptions.boolean`). Agents MUST only send `type: "boolean"`
4612
4765
  * config options to Clients that opt in; otherwise we fall back to a `select`.
@@ -4617,12 +4770,21 @@ export function clientSupportsBooleanConfigOptions(clientCapabilities) {
4617
4770
  /** Build the Fast mode config option. When the Client supports boolean config
4618
4771
  * options we expose a native `type: "boolean"` toggle; otherwise we degrade to
4619
4772
  * a two-value `select` ("on"/"off") so older Clients still get a usable
4620
- * control. */
4621
- export function createFastModeConfigOption(enabled, useBooleanOption) {
4773
+ * control.
4774
+ *
4775
+ * `disabledReason` (the SDK's `fast_mode_disabled_reason`) is folded into the
4776
+ * description while the toggle reads off, so a user whose account or provider
4777
+ * can't serve Fast mode sees why instead of a switch that silently refuses to
4778
+ * stay on. Ignored while enabled: a reason reported alongside an `on`/`cooldown`
4779
+ * state isn't blocking anything right now. */
4780
+ export function createFastModeConfigOption(enabled, useBooleanOption, disabledReason) {
4781
+ const explanation = enabled
4782
+ ? undefined
4783
+ : disabledReason && FAST_MODE_UNAVAILABLE_EXPLANATIONS[disabledReason];
4622
4784
  const base = {
4623
4785
  id: FAST_MODE_CONFIG_ID,
4624
4786
  name: "Fast mode",
4625
- description: FAST_MODE_DESCRIPTION,
4787
+ description: explanation ? `${FAST_MODE_DESCRIPTION} — ${explanation}` : FAST_MODE_DESCRIPTION,
4626
4788
  category: "model_config",
4627
4789
  };
4628
4790
  if (useBooleanOption) {
@@ -4715,7 +4877,7 @@ export function buildConfigOptions(modes, models, modelInfos, currentEffortLevel
4715
4877
  // option renders as a native boolean toggle for Clients that opted in, and a
4716
4878
  // two-value select otherwise.
4717
4879
  if (fastMode?.supported) {
4718
- options.push(createFastModeConfigOption(fastMode.enabled, fastMode.useBooleanOption));
4880
+ options.push(createFastModeConfigOption(fastMode.enabled, fastMode.useBooleanOption, fastMode.disabledReason));
4719
4881
  }
4720
4882
  // Only surface the Agent picker when there's a real choice — i.e. the user
4721
4883
  // has configured at least one custom agent (built-ins are filtered out in
@@ -5298,6 +5460,24 @@ function isTaskTool(toolName) {
5298
5460
  function shouldEmitToolCall(toolName) {
5299
5461
  return toolName !== "TodoWrite" && !isTaskTool(toolName);
5300
5462
  }
5463
+ /** Build the Claude Code-specific metadata for a tool call. Bash descriptions
5464
+ * are kept out of ACP's standard `title`, which clients may use as the shell
5465
+ * command preview, while still giving clients access to Claude's concise
5466
+ * human-readable title. */
5467
+ function claudeCodeMetaFromToolUse(toolUse) {
5468
+ const description = toolUse.name === "Bash" &&
5469
+ toolUse.input !== null &&
5470
+ typeof toolUse.input === "object" &&
5471
+ "description" in toolUse.input &&
5472
+ typeof toolUse.input.description === "string"
5473
+ ? toolUse.input.description
5474
+ : undefined;
5475
+ return {
5476
+ toolName: toolUse.name,
5477
+ ...(description ? { title: description } : {}),
5478
+ ...((toolUse.name === "Agent" || toolUse.name === "Task") && { subagent: true }),
5479
+ };
5480
+ }
5301
5481
  /** Build the `tool_call` (or, with `refine`, the `tool_call_update`)
5302
5482
  * notification for a tool_use. Shared by every site that surfaces a tool call:
5303
5483
  * the streamed tool_use path (first encounter → tool_call, later encounter →
@@ -5308,7 +5488,7 @@ function shouldEmitToolCall(toolName) {
5308
5488
  function toolCallNotification(toolUse, rawInput, supportsTerminalOutput, cwd, refine = false) {
5309
5489
  if (refine) {
5310
5490
  return {
5311
- _meta: { claudeCode: { toolName: toolUse.name } },
5491
+ _meta: { claudeCode: claudeCodeMetaFromToolUse(toolUse) },
5312
5492
  toolCallId: toolUse.id,
5313
5493
  sessionUpdate: "tool_call_update",
5314
5494
  rawInput,
@@ -5317,7 +5497,7 @@ function toolCallNotification(toolUse, rawInput, supportsTerminalOutput, cwd, re
5317
5497
  }
5318
5498
  return {
5319
5499
  _meta: {
5320
- claudeCode: { toolName: toolUse.name },
5500
+ claudeCode: claudeCodeMetaFromToolUse(toolUse),
5321
5501
  ...(toolUse.name === "Bash" && supportsTerminalOutput
5322
5502
  ? { terminal_info: { terminal_id: toolUse.id } }
5323
5503
  : {}),
@@ -5342,7 +5522,9 @@ function streamedInputRefinement(toolUse, input, supportsTerminalOutput, cwd) {
5342
5522
  }
5343
5523
  const { title, kind, locations } = toolInfoFromToolUse({ ...toolUse, input }, supportsTerminalOutput, cwd);
5344
5524
  return {
5345
- _meta: { claudeCode: { toolName: toolUse.name } },
5525
+ _meta: {
5526
+ claudeCode: claudeCodeMetaFromToolUse({ ...toolUse, input }),
5527
+ },
5346
5528
  toolCallId: toolUse.id,
5347
5529
  sessionUpdate: "tool_call_update",
5348
5530
  rawInput: input,
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation.d.ts","sourceRoot":"","sources":["../src/elicitation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EACV,wBAAwB,EAKzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,6CAA6C,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,GAChB,wBAAwB,GAAG,IAAI,CAyBjC;AAgBD;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,yBAAyB,GAClC,iBAAiB,CAUnB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAUhG;AAwBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAC7C,SAA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ClC,SAAS,EAAE,eAAe,EAAE,GAC3B,sBAAsB,CAkCxB;AAgBD;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,qBAAqB,GAAG,IAAI,CAW9B;AAYD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,MAAM,GAChB,wBAAwB,CA+B1B;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,yBAAyB,GAAG,MAAM,CAG7F"}
@@ -89,6 +89,13 @@ function questionCustomFieldKey(index) {
89
89
  * extensions (`_claude/...`).
90
90
  */
91
91
  const OPTION_META_KEY = "_claude/askUserQuestionOption";
92
+ /**
93
+ * Shared `_meta` key for marking a per-question free-text field as the custom
94
+ * answer companion for a select question. This intentionally has no
95
+ * agent-specific namespace so ACP clients can recognize the same marker across
96
+ * Codex, Claude, and other AskUserQuestion bridges.
97
+ */
98
+ const CUSTOM_ANSWER_META_KEY = "_askUserQuestionCustomAnswer";
92
99
  /**
93
100
  * Render the AskUserQuestion tool's questions as an ACP form elicitation.
94
101
  *
@@ -137,6 +144,12 @@ export function askUserQuestionsToCreateRequest(questions, sessionId, toolCallId
137
144
  type: "string",
138
145
  title: "Other",
139
146
  description: "Type your own answer instead of choosing an option above (optional).",
147
+ _meta: {
148
+ [CUSTOM_ANSWER_META_KEY]: {
149
+ questionId: questionFieldKey(index),
150
+ isCustomAnswer: true,
151
+ },
152
+ },
140
153
  };
141
154
  });
142
155
  const requestedSchema = {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAaL,eAAe,EACf,gBAAgB,EAChB,eAAe,EAKhB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAGL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,yCAAyC,EAGzC,qCAAqC,EAGrC,kCAAkC,EAGlC,+CAA+C,EAI/C,wBAAwB,EACxB,kCAAkC,EAIlC,gCAAgC,EAEhC,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AA2B9C,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,aAAa,CAAC,EAAE;YACd,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,eAAe,CAAC,EAAE;YAChB,WAAW,EAAE,MAAM,CAAC;YACpB,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,aAAa,CAAC,EAAE;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,CAAC;YAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;SACvB,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,wBAAgB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;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,OAAO,GAAG;IACrE,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC,CAoCA;AAcD,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,wBAEG;IACD,iBAAiB,CAAC,EAAE,CAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,EAClB,YAAY,EAAE,OAAO,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,SAKF,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAC/B,UAAU;IAAE,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,KAAG,YAiBtD,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GACxB,SAAS;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,KAAG,YAsBpE,CAAC"}
package/dist/tools.js CHANGED
@@ -501,7 +501,17 @@ export function toolUpdateFromToolResult(toolResult, toolUse, supportsTerminalOu
501
501
  }
502
502
  case "Bash": {
503
503
  const result = toolResult.content;
504
- const terminalId = "tool_use_id" in toolResult ? String(toolResult.tool_use_id) : "";
504
+ // The terminal was announced under the tool_use's own id (see
505
+ // `toolInfoFromToolUse`), so key the output/exit metas off that: it is the
506
+ // id the client actually created a terminal for. `toolResult.tool_use_id`
507
+ // is the same value whenever present — the caller looks the tool_use up by
508
+ // it — so preferring `toolUse.id` only adds a source for the case where the
509
+ // result block carries no id at all. Anything that isn't a non-empty
510
+ // string is no id at all: `""` matches no terminal, and stringifying a
511
+ // present-but-undefined field would invent the literal `"undefined"`.
512
+ const terminalIdOf = (id) => typeof id === "string" && id.length > 0 ? id : undefined;
513
+ const terminalId = terminalIdOf(toolUse?.id) ??
514
+ terminalIdOf("tool_use_id" in toolResult ? toolResult.tool_use_id : undefined);
505
515
  const isError = "is_error" in toolResult && toolResult.is_error;
506
516
  // Extract output and exit code from either format:
507
517
  // 1. The structured BashOutput (message-level tool_use_result): its
@@ -576,7 +586,14 @@ export function toolUpdateFromToolResult(toolResult, toolUse, supportsTerminalOu
576
586
  return toAcpContentUpdate(result, isError);
577
587
  }
578
588
  }
579
- if (supportsTerminalOutput) {
589
+ // Without a terminal id there is nothing the client can reconcile these
590
+ // metas against, and emitting them anyway strands the output: a client that
591
+ // buffers output/exit for terminals it has not been told about (Zed keeps
592
+ // them in `pending_terminal_output`/`pending_terminal_exit`, drained only on
593
+ // a matching create) would hold them forever behind an id that never
594
+ // arrives, showing an empty terminal. Fall through to the code-block
595
+ // rendering below instead.
596
+ if (supportsTerminalOutput && terminalId !== undefined) {
580
597
  return {
581
598
  content: [{ type: "terminal", terminalId }],
582
599
  _meta: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.62.0",
6
+ "version": "0.64.0",
7
7
  "description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
8
8
  "main": "dist/lib.js",
9
9
  "types": "dist/lib.d.ts",
@@ -64,19 +64,19 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@agentclientprotocol/sdk": "1.3.0",
67
- "@anthropic-ai/claude-agent-sdk": "0.3.219",
67
+ "@anthropic-ai/claude-agent-sdk": "0.3.220",
68
68
  "zod": "^3.25.0 || ^4.0.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@anthropic-ai/sdk": "0.114.0",
71
+ "@anthropic-ai/sdk": "0.115.0",
72
72
  "@eslint/js": "10.0.1",
73
73
  "@tsconfig/node22": "22.0.5",
74
- "@types/node": "26.1.1",
74
+ "@types/node": "26.1.2",
75
75
  "@typescript-eslint/eslint-plugin": "8.65.0",
76
76
  "@typescript-eslint/parser": "8.65.0",
77
- "eslint": "10.7.0",
77
+ "eslint": "10.8.0",
78
78
  "eslint-config-prettier": "10.1.8",
79
- "globals": "17.7.0",
79
+ "globals": "17.8.0",
80
80
  "prettier": "3.9.6",
81
81
  "ts-node": "10.9.2",
82
82
  "typescript": "6.0.3",