Repository navigation
Conversation
Qwen Code 0.26.7 stopped running the hooks in a project's .qwen/settings.json until the folder is explicitly trusted, and 0.26.8 added an approval dialog keyed on a hash of the hooks block. Until one of those happens no Entire hook fires, so a Qwen session records nothing, and a headless qwen -p run never shows the dialog. Document both ways to allow the hooks, what a headless run needs, and the folder trust the live lifecycle tests now need. Fix the usage examples, which ran qwen -p straight after entire enable and so recorded nothing on current Qwen. Refs entireio#110
Kilo review on fork PR 3: a rejection from Qwen's approval dialog still holds in a trusted folder for runs without --yolo, so the trust advice now says to clear it. Qwen Code 0.26.7 has no approval dialog, so the usage examples now say to trust the folder there instead.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Option 1 from #110: document that Qwen Code 0.26.7 and later skip the adapter's hooks until the user approves them or trusts the folder.
@ashtom @suhaanthayyil, you've merged and written most of the Qwen adapter, so I'm tagging you here. In #110 I offered a PR for whichever option you prefer. This is the minimum one (docs), sent now so it's ready to merge. If you'd rather have option 2 (a warning at install) or option 3 (user-level hooks) as well or instead, say so and I'll follow up or close this.
Why
Since Qwen Code 0.26.7, Qwen skips the hooks in a project's
.qwen/settings.jsonuntil the user allows them. The adapter installs all of its hooks there, so until then no Entire hook runs and the session records nothing: no prompts, no turns, no checkpoint. Qwen only prints a warning. Neither README mentions this, and both usage examples runqwen -p ... --yolostraight afterentire enable, which records nothing on current Qwen.What
qwen -prun needs, that Qwen asks again when the hooks or the project's env change, how to undo a rejection, and that the files move under$QWEN_HOMEwhen it is set.qwento approve the hooks.QWEN_E2Erow in the root README: the live lifecycle tests runqwen -p --yoloin new temp repos, so on 0.26.7 and later they need folder trust that covers$TMPDIR.How Qwen decides (0.26.9 npm bundle)
hookApprovals.jsonin the global Qwen dir (QWEN_CODE_HOOK_APPROVALS_PATHoverrides it). The key is a sha256 of the hooks block plus the project's env (.envfiles inside the workspace and theenvsetting). A missing or mismatched entry ispending(LoadedHookApprovals.getState).applyProjectHooksApproval: hooks stay pending unless they were approved, or the folder is explicitly trusted and they weren't rejected.security.folderTrust.enabled(or IDE workspace trust) plus a trust rule for the folder.TRUST_FOLDERcovers subdirectories, andTRUST_PARENTcovers the parent.--yoloon the command line skips the approval gate. The hooks then run only if they were approved earlier and the hash still matches, or if the folder is explicitly trusted. A headless run without--yolowarns "they are not approved for this folder. Run qwen interactively here to review them"; with--yoloit warns "the folder is not explicitly trusted".Not in this PR
install-hooks. The protocol's response is just{"hooks_installed": N}, and the CLI'sexternal.Agent.runInreads stderr only when the subcommand fails, so a notice printed on success never shows up inentire enable. An install-time notice needs a CLI or protocol change, so this PR is docs only.~/.qwen.Verification
go build ./...andgo test ./...inagents/entire-agent-qwenpass.--yolorun in an untrusted folder printed the warning and ran no hooks, and once the folder was trusted every hook fired. I didn't run the approval dialog or the non-yolo headless warning live.Refs #110