Repository navigation
fix(thread): stop thread ask from sending its prompt twice - #141
Conversation
The API's thread create call already sends the prompt as the first user message (nominal#2516), so a second messages post duplicates it. This test records every request a --no-wait ask makes and expects one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
threads.post sends the prompt as the first user message server-side (nominal#2516), and the follow-up messages post sent the same prompt again, so every ask produced two identical user messages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Polylane could not verify the production impact of this pull request. The create route carries the prompt: nominal-api-threads-prod served 83,310 requests over 72h at 0 errors, and the server builds the first user message from the create body, so the deleted POST was a duplicate. The Conductor entry has no remaining reference in the repo and the CLI cannot change the server's support for it.
Also considered · 2 refuted
Analysed against 8 cloud accounts and 1 repository
Polylane could not find the cloud resources this repository manages, so this review looked at the entire cloud account. Connect this repository to its resources and the next review will focus on exactly what this code deploys to. Polylane analysed Previous verdicts (1)
|
nwm-54
left a comment
There was a problem hiding this comment.
Review complete. Merge readiness is blocked by the existing Conductor API contract mismatch.
I am Codex writing on behalf of Vi Tran.
Reviewed f9910fb in the current coding client, including a second independent read-only review. No correctness or security findings in the two-file diff. The threads create route sends the initial prompt server-side. The waiting path only polls, and thread continue retains its legitimate message POST.
Verification completed locally: npm ci, codegen, lint, and all 623 tests pass on Node 26.8.1. The new regression test fails when the deleted messagesPost call is restored and passes with this PR. The Node 20/22/24 CI matrix is not green.
Typecheck fails at src/commands/integration/connect.ts:422 and :1497 because the live production OpenAPI spec omits conductor. I reproduced both errors on current main at 9885576 using a separate worktree. The integration connect file is identical between main and this head. A cache-busted production spec request also omits conductor. The same two diagnostics fail the current PR CI run: https://github.com/coreplanelabs/cli/actions/runs/42771979121
Required next action: reconcile the production API spec with the existing Conductor integration contract, then rerun the checks. This requires a separate contract repair; this duplicate-send fix does not cause the errors. No source changes were needed for this review. No unresolved review threads are present.
nwm-54
left a comment
There was a problem hiding this comment.
LGTM: the prompt is sent once, and the CLI no longer offers the retired Conductor integration.
I am Codex writing on behalf of Vi Tran.
Reviewed current head 59d87bb in this coding client, including independent review of the final diff. No actionable findings remain.
Correction to my earlier review: the backend deliberately removed Conductor in coreplanelabs/nominal#6150. The API spec is correct; the CLI entries were stale. Commit 59d87bb removes those entries from the connect type, picker, credential instructions and help, and updates the picker expectations. This clears both reported type errors without weakening the generated API types.
Local verification on Node 26.8.1: codegen, typecheck, lint, all 623 tests, build, and built CLI --version/--help pass. Both behavior tests were verified red before their fixes and green after. The independent reviewer also ran the two affected test files, with all 13 tests passing. The PR description reflects the final scope.
CI must complete on this new head before merge readiness is confirmed. No merge was performed.
Why
Every
polylane thread askproduced two identical user messages on the new thread. The API's thread create call already sends the prompt as the first user message (coreplanelabs/nominal#2516), and the CLI then posted the same prompt again as a separate message.What changed
thread askno longer calls the messages endpoint after creating the thread; the prompt travels only in the create call.--no-waitask makes and expects exactly one POST to the threads endpoint.Scope
thread askonly.thread continueposts to an existing thread, so its single messages call is correct.Blast Radius
The ask command stops sending duplicate prompts. The integration picker also stops offering the retired Conductor service. The server contract it now relies on is the same one the console has used since the create call started sending the first message.
Verification
--verboseshowed a single POST.npm run typecheck,npm run lint,npm run test(623 pass), andnpm run buildpass locally on Node 26.8.1. Built CLI--versionand--helpsmoke checks pass.🤖 Generated with Claude Code