Commit Graph

49043 Commits

Author SHA1 Message Date
sxxtony
bf8f5d991c fix(acp): drop unsupported timeout config option for claude-agent-acp
`runtime-options.buildRuntimeConfigOptionPairs` translated
`AcpSessionRuntimeOptions.timeoutSeconds` into a
`session/set_config_option(configId: "timeout")` pair on every turn. Both the
control plane (`AcpSessionManager.applyManagerRuntimeControls`) and the ACPX
wrapper (`AcpxRuntime.setConfigOption`) sit between that pair and the backend:

- The control plane validates pairs against the backend's advertised
  config-option keys and throws `ACP_BACKEND_UNSUPPORTED_CONTROL` for any
  pair the backend did not advertise. claude-agent-acp does not advertise a
  `timeout` alias.
- The wrapper then forwards remaining pairs to the delegate. The Codex ACP
  command was already short-circuited there; every other command, including
  claude-agent-acp, fell through.

Net effect on the reporter's scenario:
`sessions_spawn({ runtime:"acp", agentId:"claude", timeoutSeconds: 60 })`
failed at the control-plane validation with `ACP_BACKEND_UNSUPPORTED_CONTROL`
(and, had it reached the wire, claude-agent-acp would have answered
`-32603 Internal error / Unknown config option: timeout`, surfacing as
`ACP_TURN_FAILED: Internal error`).

Fix two layers:

1. Control plane (`src/acp/control-plane/runtime-options.ts`): add
   `isTimeoutConfigOptionAdvertised(advertisedConfigOptionKeys)` and gate the
   timeout pair on it. When advertised keys are unknown (`undefined` or
   empty), keep emitting the pair — this preserves current behavior for
   backends that have not produced a capability list yet. When advertised
   keys are present but exclude every alias in
   `RUNTIME_CONFIG_OPTION_ALIASES.timeoutSeconds`, skip the pair. The
   per-turn timeout is still enforced in-process via
   `AcpSessionManager.resolveTurnTimeoutMs` in `manager.core.ts`.

2. ACPX wrapper (`extensions/acpx/src/runtime.ts`): hoist the Codex
   `timeout` / `timeout_seconds` suppression so it also applies to
   claude-agent-acp commands. Add `isClaudeAcpCommand` mirroring
   `isCodexAcpCommand` (package spec, binary, generated wrapper script).
   This layer is defense in depth — relevant when callers reach the wrapper
   without going through `applyManagerRuntimeControls`, or when advertised
   keys are not yet known.

Coverage:

- `src/acp/control-plane/runtime-options.test.ts` (new) asserts:
  - the timeout pair is omitted when advertised keys exclude every alias,
  - the pair is kept when `timeout` or `timeout_seconds` is advertised,
  - the pair is kept when advertised keys are unknown,
  - model/thinking emission is unaffected.
- `extensions/acpx/src/runtime.test.ts` flips the previous
  `forwards timeout config controls for non-Codex ACP agents` test, which
  codified the buggy behavior, into a suppression assertion. Adds a
  positive `still forwards non-timeout config controls for claude-agent-acp`
  test and an `isClaudeAcpCommand` detector test.

Closes #81127
2026-05-13 11:35:36 +05:30
Peter Steinberger
50cb5ae089 test: dedupe openrouter stream mock read 2026-05-13 07:05:03 +01:00
Peter Steinberger
6a589017ca test: dedupe memory wiki gateway mock reads 2026-05-13 07:03:45 +01:00
Peter Steinberger
3945fd5812 test: dedupe tokenjuice mock read 2026-05-13 07:02:06 +01:00
Peter Steinberger
53032505bd test: dedupe memory lancedb provider assertion 2026-05-13 07:00:59 +01:00
Peter Steinberger
b8727202a5 test: dedupe inworld tts mock read 2026-05-13 06:59:47 +01:00
Peter Steinberger
7de4c47da2 test: dedupe qa credential lease mock read 2026-05-13 06:57:56 +01:00
Peter Steinberger
2a931b5906 test: dedupe google meet oauth mock read 2026-05-13 06:56:44 +01:00
Peter Steinberger
be343e3134 test: dedupe zalouser pairing mock reads 2026-05-13 06:55:30 +01:00
Peter Steinberger
0e3347cba6 test: dedupe reply flow mock read 2026-05-13 06:54:15 +01:00
Peter Steinberger
dccb382283 test: dedupe hook security mock read 2026-05-13 06:51:28 +01:00
Peter Steinberger
134461723e test: dedupe session hook mock read 2026-05-13 06:49:45 +01:00
Peter Steinberger
4a6e46152a test: dedupe sandbox media mock read 2026-05-13 06:48:05 +01:00
Peter Steinberger
6de17fcb75 test: dedupe exec host mock read 2026-05-13 06:46:29 +01:00
Peter Steinberger
560679a2ad test: dedupe outbound channel mock read 2026-05-13 06:45:08 +01:00
Peter Steinberger
af21973ea2 test: dedupe outbound send mock read 2026-05-13 06:43:10 +01:00
Peter Steinberger
07ffc2b955 test: dedupe outbound media mock read 2026-05-13 06:41:47 +01:00
Peter Steinberger
2b5d9bb47c test: dedupe cron owner auth mock read 2026-05-13 06:39:53 +01:00
Peter Steinberger
cd993f4584 test: dedupe cron fast mode mock read 2026-05-13 06:38:15 +01:00
Peter Steinberger
210f606be8 test: dedupe lmstudio stream mock read 2026-05-13 06:36:48 +01:00
Peter Steinberger
93233b2c6b test: dedupe azure speech mock reads 2026-05-13 06:35:12 +01:00
Peter Steinberger
f513c3f0dd test: dedupe qa manual lane mock reads 2026-05-13 06:32:35 +01:00
Peter Steinberger
b21630d6d1 test: dedupe memory watcher mock reads 2026-05-13 06:30:58 +01:00
Peter Steinberger
61268e8117 test: dedupe memory search mock read 2026-05-13 06:29:31 +01:00
Peter Steinberger
df9c9adeff test: dedupe mantle anthropic mock read 2026-05-13 06:27:58 +01:00
Peter Steinberger
87109e5fb5 test: dedupe anthropic vertex mock reads 2026-05-13 06:26:33 +01:00
Peter Steinberger
a282bdc601 test: dedupe openai image mock reads 2026-05-13 06:25:08 +01:00
Peter Steinberger
7bb2153fb2 test: dedupe openai tts mock reads 2026-05-13 06:23:44 +01:00
Peter Steinberger
30af076000 test: dedupe doctor registry mock read 2026-05-13 06:21:35 +01:00
homer-byte
ba1f4271e8 fix(imessage): keep pasted links without preview media (#79374)
Thanks @homer-byte.
2026-05-12 22:20:44 -07:00
Peter Steinberger
a123cddb4b test: dedupe channel module mock read 2026-05-13 06:19:57 +01:00
Ayaan Zaidi
8fe196e28b docs(changelog): add diagnostic lane PR reference 2026-05-13 10:48:46 +05:30
Ayaan Zaidi
d571f21c66 docs(changelog): note diagnostic lane fix 2026-05-13 10:48:46 +05:30
Ayaan Zaidi
3d3a2399b5 fix(logging): track reply runs in diagnostics 2026-05-13 10:48:46 +05:30
Peter Steinberger
5a10326612 test: dedupe node media log mock read 2026-05-13 06:17:56 +01:00
Peter Steinberger
934198b9a5 test: dedupe mcp channel mock read 2026-05-13 06:16:31 +01:00
Peter Steinberger
b25f657394 test: dedupe fetch timeout mock read 2026-05-13 06:15:29 +01:00
Peter Steinberger
6715ac526e test: dedupe plugin cli mock reads 2026-05-13 06:13:46 +01:00
Peter Steinberger
0b0539af17 test: dedupe outbound send mock read 2026-05-13 06:12:32 +01:00
Peter Steinberger
5a2dfac674 test: dedupe cli utility mock read 2026-05-13 06:11:23 +01:00
Peter Steinberger
6af82efcad test: dedupe feishu chat mock reads 2026-05-13 06:10:09 +01:00
Peter Steinberger
54c633db36 test: dedupe feishu docx mock reads 2026-05-13 06:09:06 +01:00
Peter Steinberger
73e0c51a5a test: dedupe vydra fetch mock reads 2026-05-13 06:07:49 +01:00
Peter Steinberger
832f91adbc test: dedupe gateway devices mock read 2026-05-13 06:06:21 +01:00
Peter Steinberger
8d50c3bc05 test: dedupe gateway tools mock reads 2026-05-13 06:05:23 +01:00
Peter Steinberger
2e7036e85c test: dedupe gateway sessions mock read 2026-05-13 06:04:18 +01:00
Peter Steinberger
f9157fcf82 test: dedupe gateway drain mock read 2026-05-13 06:03:11 +01:00
Peter Steinberger
5c67c93ac9 test: dedupe brave fetch mock read 2026-05-13 06:01:48 +01:00
Gio Della-Libera
f141a086fc fix(update): suppress handoff newer-config warning (#81235)
Merged via squash.

Prepared head SHA: 61a5c975bf
Co-authored-by: giodl73-repo <giodl@microsoft.com>
Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com>
Reviewed-by: @galiniliev
2026-05-12 22:01:21 -07:00
Peter Steinberger
94fdc56b64 test: dedupe cron ops mock read 2026-05-13 06:00:25 +01:00