Skip to content

feat(qoder): follow agent-hook tools/maxTurns and security.disableYoloMode - #3916

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3421-qoder-followup
Nov 20, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3421-qoder-followup

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Refs #3421

Follows up two gaps from the 2026-11-19 re-check of the Qoder upstream.

Summary

  • Agent hooks: tools and maxTurns. The Qoder hooks reference documents both on type: "agent" handlers (the verifier sub-agent's tool allow-list, and its turn limit, default 50). Before this change rulesync dropped them silently. They are now canonical hook fields: tools is a string array and maxTurns a positive integer. Qoder agent hooks emit and import them. On any other hook type, generate and import drop them with a warning, because Qoder's prompt hooks are a single LLM call with no tools or turns.
    • To support this, the per-hook passthrough registrations now take an optional hookTypes set alongside commandOnly. The keyword fields already had this option. The "documented on ... hooks only" warnings now name the hook types the field is documented on.
  • Permissions: security.disableYoloMode. The qoder override can now author this key from the settings reference in .qoder/settings.json / ~/.qoder/settings.json. It is merged into the existing security group, so security.folderTrust and the other keys stay as they are, and it is imported back. Other security keys are skipped with a warning, the same as unmodeled keys in the other groups. The key only hardens Qoder, so it gets no permissive-setting warning. security was added to the shared-config ownership of .qoder/settings.json.
  • Updated docs (docs/reference/file-formats.md, plus the regenerated src/generated/docs-content.ts).

Remaining (not in this PR)

  • rules: agentsmd.subprojectPath for Qoder. Qoder loads <subdir>/.qoder/rules/*.md on demand (memory docs), but rulesync still writes such rules to the root .qoder/rules/. Mirroring TraeRule (write and import nested .qoder/rules/) is a separate, larger change.
  • QueryEnd stays watch-only until the hooks docs list it.

Tests

  • qoder-hooks.test.ts: agent hooks emit tools / maxTurns. A prompt hook drops both with a warning. On import they are kept on agent hooks only, and a non-positive maxTurns is refused.
  • qoder-permissions.test.ts: security.disableYoloMode merges over existing security keys with no warning, an unmodeled security key is skipped with a warning, and the key round-trips on import.
  • pnpm cicheck passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 20, 2026 11:30
…oMode

- Add canonical `tools` / `maxTurns` hook fields and forward them on Qoder
  `agent` hooks (emit and import); other hook types drop them with a warning.
  Per-hook passthrough fields gain an optional `hookTypes` restriction.
- Let the `qoder` permissions override author `security.disableYoloMode`,
  merged into the existing `security` group and imported back.

Refs #3421

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…der-followup

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit af5734f into main Nov 20, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3421-qoder-followup branch November 20, 2026 03:12
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.

1 participant