From 2105e2f4ee11c606087613c5030664e58107d609 Mon Sep 17 00:00:00 2001 From: hatayama Date: Mon, 13 Jul 2026 23:37:13 +0900 Subject: [PATCH 1/2] Document API Update consent modal in compile timeout guidance Interactive Editors cannot suppress Script Updating Consent publicly; steer agents to ask the user instead of auto-dismissing when compile wait or main-thread stalls suggest a modal. Co-authored-by: Cursor --- .agents/skills/uloop-compile/SKILL.md | 4 ++++ .claude/skills/uloop-compile/SKILL.md | 4 ++++ Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md | 4 ++++ cli/common/errors/error_editor_unresponsive.go | 6 ++++++ cli/common/errors/error_envelope_test.go | 3 +++ cli/dispatcher/shared-inputs-stamp.json | 2 +- .../internal/projectrunner/compile_wait_test.go | 1 + .../internal/projectrunner/execution_errors.go | 1 + cli/project-runner/shared-inputs-stamp.json | 2 +- 9 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.agents/skills/uloop-compile/SKILL.md b/.agents/skills/uloop-compile/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/.agents/skills/uloop-compile/SKILL.md +++ b/.agents/skills/uloop-compile/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/.claude/skills/uloop-compile/SKILL.md b/.claude/skills/uloop-compile/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/.claude/skills/uloop-compile/SKILL.md +++ b/.claude/skills/uloop-compile/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md b/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md +++ b/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/cli/common/errors/error_editor_unresponsive.go b/cli/common/errors/error_editor_unresponsive.go index e776534159..4441c16648 100644 --- a/cli/common/errors/error_editor_unresponsive.go +++ b/cli/common/errors/error_editor_unresponsive.go @@ -2,6 +2,11 @@ package clierrors import "github.com/hatayama/unity-cli-loop/common/unityipc" +// ApiUpdateConsentModalNextAction is shared recovery guidance when the Editor main +// thread may be blocked by Unity's API Update / Script Updating Consent modal +// (group-5 PR 5-3: interactive Editors have no public suppress path). +const ApiUpdateConsentModalNextAction = "The Editor may be showing an API Update / Script Updating Consent modal; check the Unity window and ask the user what to choose — never auto-dismiss it." + func connectionAttemptCause(err *unityipc.ConnectionAttemptError) string { if err == nil { return "" @@ -24,6 +29,7 @@ func unityEditorUnresponsiveError(err *unityipc.EditorUnresponsiveError, context Command: context.Command, NextActions: []string{ "Check Unity for a modal dialog or long editor operation that is blocking the Editor main thread.", + ApiUpdateConsentModalNextAction, "Run `uloop focus-window` if Unity is hidden behind another window.", "Close the modal dialog or wait for the Editor operation to finish, then retry the command.", }, diff --git a/cli/common/errors/error_envelope_test.go b/cli/common/errors/error_envelope_test.go index 7860144d89..438f04798b 100644 --- a/cli/common/errors/error_envelope_test.go +++ b/cli/common/errors/error_envelope_test.go @@ -140,6 +140,9 @@ func TestClassifyEditorUnresponsiveError(t *testing.T) { if !strings.Contains(joinedActions, "modal dialog") { t.Fatalf("next actions should mention modal dialog: %#v", cliErr.NextActions) } + if !strings.Contains(joinedActions, "API Update") || !strings.Contains(joinedActions, "never auto-dismiss") { + t.Fatalf("next actions should mention API Update consent guidance: %#v", cliErr.NextActions) + } if !strings.Contains(joinedActions, "uloop focus-window") { t.Fatalf("next actions should mention focus-window: %#v", cliErr.NextActions) } diff --git a/cli/dispatcher/shared-inputs-stamp.json b/cli/dispatcher/shared-inputs-stamp.json index 5fb6596a61..f698381855 100644 --- a/cli/dispatcher/shared-inputs-stamp.json +++ b/cli/dispatcher/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "8b248a96bc8a1cbc8312c7f77da08d9ef8903680" + "sharedInputsHash": "033603e642ddb95410f139bc5b081ab6449c6145" } diff --git a/cli/project-runner/internal/projectrunner/compile_wait_test.go b/cli/project-runner/internal/projectrunner/compile_wait_test.go index 7da29d091b..c37d9bcc7f 100644 --- a/cli/project-runner/internal/projectrunner/compile_wait_test.go +++ b/cli/project-runner/internal/projectrunner/compile_wait_test.go @@ -574,6 +574,7 @@ func TestCompileWaitTimeoutError(t *testing.T) { expectedActions := []string{ "Run a light command such as `uloop get-logs --max-count 1` to check whether Unity is responsive before treating this as a freeze.", "Unity-side compile continues after this timeout; retry `uloop compile` — the result remains retrievable for about 10 more minutes without `uloop launch -r`.", + clierrors.ApiUpdateConsentModalNextAction, "Only if Unity does not respond to any command, restart it with `uloop launch -r`.", } if len(cliErr.NextActions) != len(expectedActions) { diff --git a/cli/project-runner/internal/projectrunner/execution_errors.go b/cli/project-runner/internal/projectrunner/execution_errors.go index e8caddfe5f..a1bf1261d1 100644 --- a/cli/project-runner/internal/projectrunner/execution_errors.go +++ b/cli/project-runner/internal/projectrunner/execution_errors.go @@ -25,6 +25,7 @@ func compileWaitTimeoutError(projectRoot string) clierrors.CLIError { NextActions: []string{ "Run a light command such as `uloop get-logs --max-count 1` to check whether Unity is responsive before treating this as a freeze.", "Unity-side compile continues after this timeout; retry `uloop compile` — the result remains retrievable for about 10 more minutes without `uloop launch -r`.", + clierrors.ApiUpdateConsentModalNextAction, "Only if Unity does not respond to any command, restart it with `uloop launch -r`.", }, } diff --git a/cli/project-runner/shared-inputs-stamp.json b/cli/project-runner/shared-inputs-stamp.json index e608f05e02..14d7e9d453 100644 --- a/cli/project-runner/shared-inputs-stamp.json +++ b/cli/project-runner/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "8c336555a69a3cf485147e5669ce8bb4d3fe2982" + "sharedInputsHash": "1a172ee39ad96eb18508f235e8606fe3b36f5ad3" } From 82d569cafc19c5f8b3fe68418501587be41435af Mon Sep 17 00:00:00 2001 From: hatayama Date: Mon, 13 Jul 2026 23:39:34 +0900 Subject: [PATCH 2/2] Drop PR provenance tag from API Update NextActions const comment Co-authored-by: Cursor --- cli/common/errors/error_editor_unresponsive.go | 4 ++-- cli/dispatcher/shared-inputs-stamp.json | 2 +- cli/project-runner/shared-inputs-stamp.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/common/errors/error_editor_unresponsive.go b/cli/common/errors/error_editor_unresponsive.go index 4441c16648..6b509e6a9b 100644 --- a/cli/common/errors/error_editor_unresponsive.go +++ b/cli/common/errors/error_editor_unresponsive.go @@ -3,8 +3,8 @@ package clierrors import "github.com/hatayama/unity-cli-loop/common/unityipc" // ApiUpdateConsentModalNextAction is shared recovery guidance when the Editor main -// thread may be blocked by Unity's API Update / Script Updating Consent modal -// (group-5 PR 5-3: interactive Editors have no public suppress path). +// thread may be blocked by Unity's API Update / Script Updating Consent modal. +// Interactive Editors have no public suppress path. const ApiUpdateConsentModalNextAction = "The Editor may be showing an API Update / Script Updating Consent modal; check the Unity window and ask the user what to choose — never auto-dismiss it." func connectionAttemptCause(err *unityipc.ConnectionAttemptError) string { diff --git a/cli/dispatcher/shared-inputs-stamp.json b/cli/dispatcher/shared-inputs-stamp.json index f698381855..3345afda4f 100644 --- a/cli/dispatcher/shared-inputs-stamp.json +++ b/cli/dispatcher/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "033603e642ddb95410f139bc5b081ab6449c6145" + "sharedInputsHash": "fbbc3c34d301331c513155ea2bab2a33a4b5de97" } diff --git a/cli/project-runner/shared-inputs-stamp.json b/cli/project-runner/shared-inputs-stamp.json index 14d7e9d453..7e7d299f1b 100644 --- a/cli/project-runner/shared-inputs-stamp.json +++ b/cli/project-runner/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "1a172ee39ad96eb18508f235e8606fe3b36f5ad3" + "sharedInputsHash": "581697442cd42c4467c8a80ab3bce98f403890c6" }