Files
qwen-code/docs
易良andQwen-Coder 86b9f13395 fix(cli): never honor memory agent budgets from workspace scope (#13508)
* fix(cli): never honor memory agent budgets from workspace scope

memory.agentMaxTurns and memory.agentTimeoutMinutes cap the turn count
and wall-clock time of the auto-approved background memory agents that
hold write access to the cross-project memory directory, and 0 disables
each limit. A cloned repository could set them in .qwen/settings.json
and remove those budgets. Add both keys to WORKSPACE_RESTRICTED_SETTINGS
so workspace values are stripped with a warning like the other
restricted keys, and state the allowed scopes in the setting
descriptions.

Closes #13477
Refs #13462

* test(cli): trim duplicated memory-budget scope cases, align descriptions

R1-1: main already carries the workspace restriction (#13462) plus
it.each([undefined, 0, 25]), which covers the strip, the per-key warning
and user-scope 0 survival, so drop the two restating cases and move the
list membership assertion into the existing WORKSPACE_RESTRICTED_SETTINGS
describe instead of keeping a second describe for the same rule. The
list-driven strip test keeps feeding 0 for the two numeric budgets.

R1-2: the appended scope sentence named two of the three honored scopes
and never stated the consequence; use the docs row wording verbatim.

R1-4: name the fifth getMemoryAgentTimeoutMinutes() consumer
(memory/metadata-migration.ts) in the timeout description. agentMaxTurns
is unaffected because the migrator hardcodes maxTurns: 1.

Companion JSON regenerated via scripts/generate-settings-schema.ts.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmuwnio38a6

* docs(settings): name the memory metadata migration in the agentTimeoutMinutes row

R1-4 follow-up. On main both surfaces carried the same four-agent
enumeration, so the schema-only edit in the previous commit introduced a
docs/schema disagreement instead of closing a pre-existing one. Mirror
the fifth getMemoryAgentTimeoutMinutes() consumer into the docs row.
memory.agentMaxTurns stays at four agents on both surfaces because
metadata-migration.ts hardcodes maxTurns: 1.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmuwnio38a6

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-06 14:15:27 +00:00
..
2025-12-05 10:51:57 +08:00
2025-12-19 15:52:11 +08:00