Repository navigation
Description
Problem
The same refused probe gets two different JSON contracts depending on the surface a host uses:
| surface | ok |
ready |
exit |
|---|---|---|---|
CLI agentdescent plan spec.json --probe --json |
true |
false |
1 |
CLI agentdescent algorithms run ... --probe --json |
true |
false |
1 |
MCP plan(spec, probe=true) (#1170) |
false |
(absent) | — |
Hosts are told (generated SKILL.md, "run the plan with the probe on: agentdescent plan <spec> --probe, or the MCP plan(spec, probe=true) … If it refuses …") that the two are interchangeable, but a host that drives the CLI (Grok Bot scaffold, any host without MCP) must read ready, while an MCP host must read ok, and neither key means the same thing on the other surface. On the CLI ok:false means "spec/plan failed"; on MCP it now also means "plan fine, probe refused". A host porting its check from one surface to the other silently mis-reads a dead subscription as ready (CLI ok:true) or a probe refusal as an invalid spec (MCP ok:false).
Reproduction (main 6b034fd, real Volcengine Ark Coding endpoint whose CodingPlan has expired → HTTP 400 InvalidSubscription)
agentdescent algorithms run skillopt prompt.md cases.jsonl --agent openai_compatible \
--model deepseek-v4-flash --base-url https://ark.cn-beijing.volces.com/api/coding/v3 \
--key-env ARK_API_KEY --rounds 1 --workers 1 --probe --json
# -> {"ok": true, "ready": false, "next": "renew the subscription at the provider, ..."} exit 1
agentdescent plan agentdescent.skillopt.spec.json --probe --json
# -> {"ok": true, "ready": false, ...} exit 1
# MCP stdio client, tool `plan`, {"spec": <same spec dict>, "probe": true}
# -> {"ok": false, "probe": {"ok": false, "rows": [{"state": "failed", "detail": "SubscriptionInactive: ..."}]}, "next": "renew the subscription ..."} # no "ready"
next and probe.rows agree on both surfaces; only the top-level verdict keys diverge.
Expected
One documented contract for "plan ran with the probe" on every surface, so a host reads the same key on CLI and MCP.
Suggested fix (one PR, additive)
- MCP
plan(_with_probeinagentdescent/mcp.py): wheneverprobe=true, also setreadyexactly as the CLI does (bool(probe.ok)); keep the currentok:falseon refusal for backward compatibility with feat(mcp): let the plan tool run the preflight probe (#1094) #1170, or document why it differs. - Document the contract once (e.g.
docs/mcp-path-a.mdand the probe paragraph ofintegrations/SKILL.mdand its generated copies): "after a probe, readready;ready:false→ give the usernext, do notstart/evolve". - Optional: CLI
--probekeepsok:true(the plan itself is valid); say so in the same doc paragraph.
Acceptance
- With a 400
InvalidSubscriptionstub, MCPplan(spec, probe=true)returnsready: falseand CLIplan --probe --jsonreturnsready: false; with a 200 stub both returnready: true(tests on both surfaces, e.g. extendtests/test_mcp_plan_probe.py). - MCP
planwithoutprobedoes not grow areadykey (or the doc states what it means there). - The SKILL.md probe paragraph names
readyfor both surfaces; installs for all 5 hosts carry it (existing host-sync test stays green). changelog.d/fragment added.
Activity
HugoXK commentedon Nov 20, 2026
Claim:
agent/1175-probe-contract— one PR againstmain,maintainer_can_modify: true. Contract: a refused probe printsok: false+ready: false+nexton the CLI and over MCP.chore(integrations): regenerate the dsh plugin from the shared skill (#…
HugoXK commentedon Nov 20, 2026
PR: #1178 (draft) — issue + PR paired; final tip follows.
docs(changelog): drop the superseded ok semantics from the #1093 frag…