Skip to content

fix(qoder): omit scalar answer key for AskUserQuestion strict schema - #301

Open
ri-char wants to merge 1 commit into
wxtsky:mainfrom
ri-char:qoder_permission
Open

fix(qoder): omit scalar answer key for AskUserQuestion strict schema#301
ri-char wants to merge 1 commit into
wxtsky:mainfrom
ri-char:qoder_permission

Conversation

@ri-char

@ri-char ri-char commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

When a Qoder CLI agent asks the user a question and the user answers from the CodeIsland popup, the CLI rejects the hook response with:

params must NOT have additional properties

Fixed #300.

Root cause

Qoder CLI re-validates hookSpecificOutput.decision.updatedInput against the AskUserQuestion tool schema using Ajv (the params prefix comes from errorsText({ dataVar: "params" })). That schema is additionalProperties: false and only allows questions / answers / annotations / metadata.

CodeIsland's askUserQuestionUpdatedInput also injects a scalar answer key alongside answers, which trips the strict validation and voids the whole answer.

Changes

  • Add AppState.isQoderEvent (mirrors the existing isZcodeEvent pattern) to detect qoder / qoder-cli sources via _source.
  • Skip the scalar answer injection for Qoder sources in askUserQuestionUpdatedInput; answers flow through the schema-allowed answers dict keyed by question text, which Qoder remaps correctly. Other CLIs keep the existing behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qodercli 拦截交互失败

1 participant