Escalate OpenCode doom_loop permission to the parent controller #69

Closed
opened 2026-10-11 12:09:00 +09:00 by dreampiler · 1 comment
Owner

소유자 목표: 소유자 원문(운영 세션 채팅, 2026-10-11 12:1x KST) 「같은 호출 3연속이면 묻지 말고 바로 거부가 아니라 상위 세션으로 보고 하도록 하는게 맞지 않아? 실제 같은 호출을 해야 하는 작업도 있을 것 아냐.」
확인할 결과: OpenCode doom_loop requests bypass automatic approval, remain pending without continued agent work, reach the parent controller through existing question/inbox plumbing, and resolve only through that controller's explicit allow or interrupt decision; verified on the merged build in an isolated run lasting at least15minutes.
이 작업 몫: Small fork change for doom_loop only, its existing parent-permission wiring and targeted validation. Operations owns runtime installation and replacing its temporary doom_loop: deny with ask after the fix is available.
queue: KANDEV-W-096

Authority: direct Operations priority-registration request relaying the exact owner words above. Reported incident TBce8b6170/qwen-flash repeatedly ran the same glob about1700times,05:10–11:41KST, with reported DevPass cost about$50 because profile auto_approve accepted OpenCode doom_loop. These are supplied incident observations, not new worker measurements. Operations already set doom_loop: deny in ~/.config/opencode/opencode.jsonc; this task must not edit the real user configuration or reverse that temporary control.

Required behavior:

  1. At the existing orchestrator automatic permission-decision boundary (handlePermissionRequest), recognize the actual OpenCode doom_loop permission kind. Exclude this kind from automatic approval and retain the request pending. Do not auto-deny or auto-approve it based only on three repeated calls. OpenCode owns repeated-call detection; do not introduce a counter, hash/fingerprint or duplicate-call detector.
  2. Route the pending request to the existing parent controller task through existing parent-question/inbox/notification plumbing, without a new channel. Include task/session, tool, safely displayable actual input and supplied consecutive count. Preserve the meaningful input required for the decision using existing secret-redaction conventions; never copy secrets into prompts/logs/docs/PRs. Resolve metadata availability from actual OpenCode/ACP payloads; do not invent missing fields.
  3. Let the controller choose allow(normal repeated work) or interrupt(use another method or an already authorized model route). Reuse the existing permission-response path and its pending-request identity/ownership. A controller's interruption decision does not authorize hard-coded model substitution, model-order changes or arbitrary session replacement.
  4. No answer means the agent remains stopped pending, with no automatic approval/timeout approval. Reuse existing stall/watchdog reports for long waits; no new watcher, timer, gate, service or framework.
  5. Preserve automatic handling for every other permission kind. Preserve parent/source isolation and ordinary permission behavior, including late/stale responses and cancelled sessions through existing contracts. Determine the existing parentless-request/inbox fallback without auto-approving or silently discarding the request; a material missing product decision goes to parent through the normal route.

Start with the repository's spec-driven-development/planner-orchestration workflow. New durable permission behavior needs a bounded design package: requirements + system design + implementation plan + work orders, grounded in current code and existing contracts. Keep the package uncommitted for review and hand off at the completed-plan checkpoint before production/permanent-test changes. Do not signal automatic advancement to implementation until the required explicit later implementation request exists; report the package and current-stage disposition to the parent. Preserve the full implementation/verification outcome above, not just a planning-only substitute. No new owner question solely about ordinary implementation choices.

Design references: design-card invariants3(user-visible control),4(profile isolation),5(worktree isolation), D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/설계카드.md:28-32. Index points to docs/ARCHITECTURE.md §3 Orchestrator Service and §4 Agent Manager Service; select the current permission, parent-question/inbox and response contracts through the repository spec index. Read only needed portions in your assigned worktree; reconcile any outdated architecture headings with actual durable owner documents. No controller-side code investigation or shared-root edits.

Implementation after the design checkpoint: minimum change in the existing automatic-decision/parent-routing/permission-response owner paths. Reuse current libraries/components and localization. If any frontend/user-facing UI changes are necessary, apply mobile-parity and i18n and include those outcomes in the same requirement/design pair; prefer existing UI with no new screen. Use docs-maintainer/record only for this behavior's actual documentation/contract impact, not a separate public report PR.

Validation: no new permanent test files/cases, collection paths, CI, gate or framework under this request. Reuse existing narrow tests plus task-owned temporary checks outside automatic test collection. Prove actual permission entry and controller reply flow on the merged build in an isolated backend/home/DB/port for at least15continuous minutes, preserving other-permission auto-approval. Verify no response stays pending and actual controller allow/interrupt settles the same request. Use the user's authorized existing finite isolated-run method, log start/end/PID/elapsed/health/exit reason, and clean only owned temporary resources through existing procedures. Do not sum separate runs or treat build/unit checks as the required runtime result. No paid provider calls/new cost, artificial global stall, full-suite repeats, real operator-home/profile changes, operating restart or installation. Plan the exact bounded real-entry exercise using existing supported fixtures/approved engine paths rather than building a new integration framework.

Execution: standing parent8e3eb6b7 owns this immediate priority task after the installed cut; do not enqueue it in a dormant future round. Explicit Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. One Kandev-assigned worktree, no second copy/shared checkout writes/reset--hard/force push/unknown deletion/process-name termination. Dynamic workflow model routing only. Other workers are active; preserve their changes and do not take over W095/#220, W092 causal investigation, daily sync or R3/230. These are independent unless an actual artifact dependency is demonstrated; no blocked_by for priority/common files.

Delivery after authorized implementation: one fork PR --repo dreampiler/kandev, normal exact-head direct Review once, normal merge, retained relevant checks, cleanup disposition, existing jobsheet KANDEV-W-096. Report actual final main merge SHA plus reviewed_head/verdict and15minute real-entry results/limits through parent [→운영 세션]. Do not publish to kdlbs, perform independent paid reviews, install a runtime, alter temporary doom_loop deny, or claim operating deployment PASS. Future replacement build must obey Operations' current upstream-inclusion gate; this task cannot bypass the daily sync review block.

소유자 목표: 소유자 원문(운영 세션 채팅, 2026-10-11 12:1x KST) 「같은 호출 3연속이면 묻지 말고 바로 거부가 아니라 상위 세션으로 보고 하도록 하는게 맞지 않아? 실제 같은 호출을 해야 하는 작업도 있을 것 아냐.」 확인할 결과: OpenCode doom_loop requests bypass automatic approval, remain pending without continued agent work, reach the parent controller through existing question/inbox plumbing, and resolve only through that controller's explicit allow or interrupt decision; verified on the merged build in an isolated run lasting at least15minutes. 이 작업 몫: Small fork change for doom_loop only, its existing parent-permission wiring and targeted validation. Operations owns runtime installation and replacing its temporary doom_loop: deny with ask after the fix is available. queue: KANDEV-W-096 Authority: direct Operations priority-registration request relaying the exact owner words above. Reported incident TBce8b6170/qwen-flash repeatedly ran the same glob about1700times,05:10–11:41KST, with reported DevPass cost about$50 because profile auto_approve accepted OpenCode doom_loop. These are supplied incident observations, not new worker measurements. Operations already set doom_loop: deny in ~/.config/opencode/opencode.jsonc; this task must not edit the real user configuration or reverse that temporary control. Required behavior: 1. At the existing orchestrator automatic permission-decision boundary (handlePermissionRequest), recognize the actual OpenCode doom_loop permission kind. Exclude this kind from automatic approval and retain the request pending. Do not auto-deny or auto-approve it based only on three repeated calls. OpenCode owns repeated-call detection; do not introduce a counter, hash/fingerprint or duplicate-call detector. 2. Route the pending request to the existing parent controller task through existing parent-question/inbox/notification plumbing, without a new channel. Include task/session, tool, safely displayable actual input and supplied consecutive count. Preserve the meaningful input required for the decision using existing secret-redaction conventions; never copy secrets into prompts/logs/docs/PRs. Resolve metadata availability from actual OpenCode/ACP payloads; do not invent missing fields. 3. Let the controller choose allow(normal repeated work) or interrupt(use another method or an already authorized model route). Reuse the existing permission-response path and its pending-request identity/ownership. A controller's interruption decision does not authorize hard-coded model substitution, model-order changes or arbitrary session replacement. 4. No answer means the agent remains stopped pending, with no automatic approval/timeout approval. Reuse existing stall/watchdog reports for long waits; no new watcher, timer, gate, service or framework. 5. Preserve automatic handling for every other permission kind. Preserve parent/source isolation and ordinary permission behavior, including late/stale responses and cancelled sessions through existing contracts. Determine the existing parentless-request/inbox fallback without auto-approving or silently discarding the request; a material missing product decision goes to parent through the normal route. Start with the repository's spec-driven-development/planner-orchestration workflow. New durable permission behavior needs a bounded design package: requirements + system design + implementation plan + work orders, grounded in current code and existing contracts. Keep the package uncommitted for review and hand off at the completed-plan checkpoint before production/permanent-test changes. Do not signal automatic advancement to implementation until the required explicit later implementation request exists; report the package and current-stage disposition to the parent. Preserve the full implementation/verification outcome above, not just a planning-only substitute. No new owner question solely about ordinary implementation choices. Design references: design-card invariants3(user-visible control),4(profile isolation),5(worktree isolation), D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/설계카드.md:28-32. Index points to docs/ARCHITECTURE.md §3 Orchestrator Service and §4 Agent Manager Service; select the current permission, parent-question/inbox and response contracts through the repository spec index. Read only needed portions in your assigned worktree; reconcile any outdated architecture headings with actual durable owner documents. No controller-side code investigation or shared-root edits. Implementation after the design checkpoint: minimum change in the existing automatic-decision/parent-routing/permission-response owner paths. Reuse current libraries/components and localization. If any frontend/user-facing UI changes are necessary, apply mobile-parity and i18n and include those outcomes in the same requirement/design pair; prefer existing UI with no new screen. Use docs-maintainer/record only for this behavior's actual documentation/contract impact, not a separate public report PR. Validation: no new permanent test files/cases, collection paths, CI, gate or framework under this request. Reuse existing narrow tests plus task-owned temporary checks outside automatic test collection. Prove actual permission entry and controller reply flow on the merged build in an isolated backend/home/DB/port for at least15continuous minutes, preserving other-permission auto-approval. Verify no response stays pending and actual controller allow/interrupt settles the same request. Use the user's authorized existing finite isolated-run method, log start/end/PID/elapsed/health/exit reason, and clean only owned temporary resources through existing procedures. Do not sum separate runs or treat build/unit checks as the required runtime result. No paid provider calls/new cost, artificial global stall, full-suite repeats, real operator-home/profile changes, operating restart or installation. Plan the exact bounded real-entry exercise using existing supported fixtures/approved engine paths rather than building a new integration framework. Execution: standing parent8e3eb6b7 owns this immediate priority task after the installed cut; do not enqueue it in a dormant future round. Explicit Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. One Kandev-assigned worktree, no second copy/shared checkout writes/reset--hard/force push/unknown deletion/process-name termination. Dynamic workflow model routing only. Other workers are active; preserve their changes and do not take over W095/#220, W092 causal investigation, daily sync or R3/230. These are independent unless an actual artifact dependency is demonstrated; no blocked_by for priority/common files. Delivery after authorized implementation: one fork PR --repo dreampiler/kandev, normal exact-head direct Review once, normal merge, retained relevant checks, cleanup disposition, existing jobsheet KANDEV-W-096. Report actual final main merge SHA plus reviewed_head/verdict and15minute real-entry results/limits through parent [→운영 세션]. Do not publish to kdlbs, perform independent paid reviews, install a runtime, alter temporary doom_loop deny, or claim operating deployment PASS. Future replacement build must obey Operations' current upstream-inclusion gate; this task cannot bypass the daily sync review block.
Author
Owner

WITHDRAWN by Operations: KANDEV-W-096 task924179f9-0644-4ef2-a395-9bc451c15804 was halt-stopped and closed in Standard Done as withdrawal, not implementation. OpenCode1.18.35 checks only same-response parts(assistantMessage.id).slice(-3); TBce8b6170 had1489of1490single-call responses and0permission_request events, so the earlier auto_approve attribution was wrong. Operations reverted temporary doom_loopdeny. Cross-response repetition belongs to existing AIWS W-1010-35. Reason retained in task description and Plan e8b57a6e. No implementation/PR/merge claim, config change or cleanup. Operations owns flow.close-item; do not redispatch the withdrawn queue.

WITHDRAWN by Operations: KANDEV-W-096 task924179f9-0644-4ef2-a395-9bc451c15804 was halt-stopped and closed in Standard Done as withdrawal, not implementation. OpenCode1.18.35 checks only same-response parts(assistantMessage.id).slice(-3); TBce8b6170 had1489of1490single-call responses and0permission_request events, so the earlier auto_approve attribution was wrong. Operations reverted temporary doom_loopdeny. Cross-response repetition belongs to existing AIWS W-1010-35. Reason retained in task description and Plan e8b57a6e. No implementation/PR/merge claim, config change or cleanup. Operations owns flow.close-item; do not redispatch the withdrawn queue.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dreampiler/kandev#69