Skip to content

feat(manage_editor): add wait_for_compilation action#978

Open
smuhlaci wants to merge 8 commits intoCoplayDev:betafrom
smuhlaci:issue-814-wait-for-compilation
Open

feat(manage_editor): add wait_for_compilation action#978
smuhlaci wants to merge 8 commits intoCoplayDev:betafrom
smuhlaci:issue-814-wait-for-compilation

Conversation

@smuhlaci
Copy link

@smuhlaci smuhlaci commented Mar 24, 2026

Summary

  • add manage_editor(action=\"wait_for_compilation\") so agents can wait for compile plus domain reload instead of sleeping after script edits
  • add unity-mcp editor wait-compile --timeout ... and documentation updates for the new workflow
  • add integration coverage for ready, polling, timeout, and domain reload scenarios

Test plan

  • cd Server && uv run pytest tests/integration/test_manage_editor_wait.py -v

Notes

Made with Cursor

Summary by Sourcery

Add a Unity editor management action and CLI command to wait for script compilation to complete before proceeding, with integration tests and documentation updates.

New Features:

  • Introduce manage_editor wait_for_compilation action with configurable timeout to block until Unity finishes compiling and domain reload completes.
  • Add unity-mcp editor wait-compile CLI command to expose the compilation wait behavior from the command line.

Documentation:

  • Update CLI usage and examples, as well as tool reference docs, to document the new wait-for-compilation workflow and editor wait-compile command.

Tests:

  • Add integration tests covering immediate readiness, polling until ready, timeout handling, default timeout behavior, domain reload blocking, and manage_editor routing for wait_for_compilation.

Summary by CodeRabbit

  • New Features

    • Added an editor CLI command to wait for Unity script compilation with an optional timeout (default 30s, clamped to 1–120s). Reports seconds waited on success and prints an error + exits non‑zero on failure.
  • Documentation

    • Updated CLI guides, usage examples, and tool references to document the new compilation-wait command.
  • Tests

    • Added unit and integration tests covering wait behavior, timeout clamping, success/failure reporting, and polling scenarios.

smuhlaci and others added 5 commits March 24, 2026 12:34
Poll editor_state until compilation and domain reload finish so the AI
can wait for script changes to compile instead of using fixed sleep.

- manage_editor(action="wait_for_compilation", timeout=30) on server
- CLI: unity-mcp editor wait-compile [--timeout N]
- Reuses wait_for_editor_ready from refresh_unity; no C# changes

Co-authored-by: Cursor <cursoragent@cursor.com>
…wait-compile

- Remove unused _WAIT_FOR_COMPILATION_ACTIONS from manage_editor.py
- Use result.get('message', ...) in editor wait-compile so non-timeout
  errors (e.g. Python/connectivity) are reported accurately

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… not cut off

Co-authored-by: Cursor <cursoragent@cursor.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 24, 2026

Reviewer's Guide

Adds a new read-only manage_editor action wait_for_compilation, exposes it via a unity-mcp CLI subcommand, documents the new workflow, and adds integration tests covering ready, polling, timeout, and domain reload scenarios.

Sequence diagram for manage_editor wait_for_compilation via CLI

sequenceDiagram
    actor Developer
    participant CLI as unity_mcp_CLI
    participant ManageEditor as manage_editor_tool
    participant WaitHelper as _wait_for_compilation
    participant ReadyPoller as wait_for_editor_ready
    participant Unity as Unity_Editor

    Developer->>CLI: unity-mcp editor wait-compile --timeout T
    CLI->>CLI: get_config()
    CLI->>ManageEditor: run_command manage_editor
        activate ManageEditor
        ManageEditor->>ManageEditor: manage_editor(action=wait_for_compilation, timeout=T)
        ManageEditor->>WaitHelper: _wait_for_compilation(ctx, timeout=T)
        activate WaitHelper
        WaitHelper->>WaitHelper: timeout_s = clamp(T or 30, 1, 120)
        WaitHelper->>ReadyPoller: wait_for_editor_ready(ctx, timeout_s)
        activate ReadyPoller
        loop until ready or timeout
            ReadyPoller->>Unity: poll editor_state
            Unity-->>ReadyPoller: compilation_state, domain_reload_state
        end
        ReadyPoller-->>WaitHelper: ready, elapsed
        deactivate ReadyPoller
        alt editor ready
            WaitHelper-->>ManageEditor: success=True, data.waited_seconds=elapsed
        else timeout
            WaitHelper-->>ManageEditor: success=False, data.timeout_seconds=timeout_s
        end
        deactivate WaitHelper
        ManageEditor-->>CLI: result dict
        deactivate ManageEditor
    CLI->>CLI: format_output(result)
    alt success
        CLI->>Developer: print_success Compilation complete
    else failure
        CLI->>Developer: print_error Timed out waiting for compilation
    end
Loading

File-Level Changes

Change Details Files
Add wait_for_compilation action to manage_editor and route it through a dedicated helper that waits for Unity compilation/domain reload to finish.
  • Extend manage_editor tool description and Literal action set to include wait_for_compilation and optional timeout parameter.
  • Route action=="wait_for_compilation" to a new internal coroutine before resolving the Unity instance, keeping the rest of the manage_editor flow unchanged.
  • Implement _wait_for_compilation helper that clamps timeout to [1,120] seconds, delegates polling to wait_for_editor_ready, and returns structured success/timeout responses including waited_seconds and readiness metadata.
Server/src/services/tools/manage_editor.py
Expose wait_for_compilation as a CLI command and document its usage in CLI guides and tool references.
  • Add unity-mcp editor wait-compile command with a configurable timeout, ensuring the transport timeout slightly exceeds the requested wait duration and printing success/error summaries.
  • Update CLI usage and examples docs to include the new editor wait-compile command and editor capability table entry.
  • Extend tools-reference docs to show manage_editor(action="wait_for_compilation", timeout=...) usage for both the checked-in and vendored skill references.
Server/src/cli/commands/editor.py
docs/guides/CLI_USAGE.md
Server/src/cli/CLI_USAGE_GUIDE.md
.claude/skills/unity-mcp-skill/references/tools-reference.md
unity-mcp-skill/references/tools-reference.md
docs/guides/CLI_EXAMPLE.md
Add integration tests for the wait_for_compilation workflow covering ready, polling, timeout, routing through manage_editor, and domain reload handling.
  • Introduce test_wait_for_compilation_* async pytest tests that monkeypatch editor_state.get_editor_state to simulate different readiness/blocking scenarios.
  • Verify immediate return when editor is ready, repeated polling until ready, timeout behavior, default timeout handling when None, correct routing via manage_editor, and handling of both compiling and domain_reload blocking reasons.
  • Use DummyContext and environment cleanup to keep tests consistent with other integration tests.
Server/tests/integration/test_manage_editor_wait.py

Assessment against linked issues

Issue Objective Addressed Explanation
#814 Add a server-side manage_editor(action="wait_for_compilation") action that waits for Unity compilation and domain reload to finish using existing editor_state / wait_for_editor_ready logic, supports a timeout with sensible defaults and bounds, and returns immediately if the editor is already ready.
#814 Expose the new wait-for-compilation behavior to users via the CLI and update documentation / tool references to describe the new workflow and usage.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 95f0e363-ce3d-4000-8e09-2c6eaa911adb

📥 Commits

Reviewing files that changed from the base of the PR and between 4a3c899 and f4f3c55.

📒 Files selected for processing (1)
  • Server/tests/test_cli.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • Server/tests/test_cli.py

📝 Walkthrough

Walkthrough

Added a new manage_editor action wait_for_compilation with an optional timeout (clamped 1–120s), a CLI subcommand editor wait-compile, docs/examples updates, and integration/unit tests; the service delegates waiting to existing refresh_unity.wait_for_editor_ready polling logic.

Changes

Cohort / File(s) Summary
Service Implementation
Server/src/services/tools/manage_editor.py
Added wait_for_compilation action and a timeout parameter; implemented _wait_for_compilation (clamps 1–120s), calls refresh_unity.wait_for_editor_ready, returns structured success/failure data; deferred unity-instance retrieval and updated action Literal.
CLI Command
Server/src/cli/commands/editor.py
New editor wait-compile Click subcommand with --timeout/-t (default 30.0); clamps timeout, sets transport timeout ceil(timeout)+10, calls manage_editor tool, prints formatted result and exits non‑zero on failure.
Integration Tests
Server/tests/integration/test_manage_editor_wait.py
New async pytest suite mocking editor_state.get_editor_state to cover immediate success, polling-until-ready, timeout failure, default timeout, routing through manage_editor, and combined blocking reasons.
Unit Tests (CLI)
Server/tests/test_cli.py
Added tests for timeout clamping and failure handling of editor wait-compile (verifies payload timeout, transport timeout, CLI exit code and message).
CLI Docs & Guides
Server/src/cli/CLI_USAGE_GUIDE.md, docs/guides/CLI_USAGE.md, docs/guides/CLI_EXAMPLE.md
Documented new unity-mcp editor wait-compile [--timeout N] entry and example; note timeout clamped to 1–120s.
Tool References / Skill Docs
.claude/skills/unity-mcp-skill/references/tools-reference.md, unity-mcp-skill/references/tools-reference.md
Inserted example manage_editor(action="wait_for_compilation", timeout=30) into tool reference flow between layer/tag edits and prefab stage operations.

Sequence Diagram

sequenceDiagram
    participant Agent as Agent
    participant CLI as CLI\r\n(`editor.py`)
    participant Service as manage_editor\r\nService
    participant RefreshUnity as refresh_unity\r\nwait_for_editor_ready
    participant EditorState as editor_state\r\nget_editor_state

    Agent->>CLI: unity-mcp editor wait-compile --timeout 30
    CLI->>CLI: compute transport_timeout = ceil(timeout) + 10
    CLI->>Service: run_command(manage_editor, action=wait_for_compilation, timeout=30)
    Service->>RefreshUnity: wait_for_editor_ready(timeout_s=30)
    loop Poll until ready or timeout
        RefreshUnity->>EditorState: get_editor_state()
        EditorState-->>RefreshUnity: {ready_for_tools, compilation.is_compiling, ...}
        alt ready_for_tools == true
            RefreshUnity-->>Service: {waited_seconds, success:true}
        else timeout exceeded
            RefreshUnity-->>Service: {timeout_seconds, success:false}
        else keep polling
            RefreshUnity->>RefreshUnity: sleep & retry
        end
    end
    Service-->>CLI: formatted result + message
    CLI-->>Agent: success or timeout message
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 I waited by the editor light,

Till scripts compiled and all felt right,
No idle sleeps or clumsy polls,
Now waits return and speed consoles,
🥕 A happy hop — the rabbit smiles.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 65.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding a wait_for_compilation action to manage_editor, which is the primary feature in this changeset.
Description check ✅ Passed The PR description covers all key sections from the template: summary of changes, type of change (new feature), changes made, test plan, and related issues, though it deviates from the strict template format.
Linked Issues check ✅ Passed The PR fully implements issue #814 requirements: adds manage_editor(action='wait_for_compilation') with configurable timeout, CLI command, documentation updates, and comprehensive integration tests covering all specified scenarios (readiness, polling, timeout, domain reload).
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the wait_for_compilation feature: the manage_editor tool extension, CLI command, documentation updates, and comprehensive tests. No unrelated modifications were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="Server/src/services/tools/manage_editor.py" line_range="84-85" />
<code_context>
+    """Poll editor_state until compilation and domain reload finish."""
+    from services.tools.refresh_unity import wait_for_editor_ready
+
+    timeout_s = float(timeout) if timeout is not None else 30.0
+    timeout_s = max(1.0, min(timeout_s, 120.0))
+    ready, elapsed = await wait_for_editor_ready(ctx, timeout_s=timeout_s)
+
</code_context>
<issue_to_address>
**suggestion:** Consider surfacing or documenting the 120s upper bound on wait_for_compilation.

Since values are clamped to `[1.0, 120.0]`, callers can pass much larger timeouts yet only see the clamped value in the timeout message. To avoid confusion, either reject values >120 with a clear error, or explicitly document the 120s max (e.g., in the tool description / CLI help) so users know larger values won’t be honored.

Suggested implementation:

```python
async def _wait_for_compilation(ctx: Context, timeout: int | float | None) -> dict[str, Any]:
    """Poll editor_state until compilation and domain reload finish.

    The timeout is clamped to the inclusive range [1.0, 120.0] seconds to
    avoid excessively long waits in the Unity editor.
    """
    from services.tools.refresh_unity import wait_for_editor_ready

    timeout_s = float(timeout) if timeout is not None else 30.0
    # Clamp to [1.0, 120.0] seconds to keep waits reasonable and bounded.
    timeout_s = max(1.0, min(timeout_s, 120.0))
    ready, elapsed = await wait_for_editor_ready(ctx, timeout_s=timeout_s)

```

To fully surface this behavior to end users (e.g., CLI users or tool consumers), you should also:
1. Update the tool description and/or CLI help text for the command that uses `_wait_for_compilation` to mention that the timeout is clamped to a maximum of 120 seconds.
2. If there is a JSON schema or OpenAPI spec for this tool, document the valid timeout range there as well (e.g., `minimum: 1.0`, `maximum: 120.0`).
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Server/src/cli/commands/editor.py (1)

42-42: Consider using math.ceil for the transport timeout calculation.

int(timeout) truncates, so int(59.9) + 10 = 69 while the actual tool wait is 59.9s. The 10-second buffer handles this adequately, but using math.ceil(timeout) + 10 would be slightly more precise for edge cases.

🔧 Optional: Use ceiling for transport timeout
+import math
+
 `@editor.command`("wait-compile")
 ...
     # Ensure the transport timeout outlasts the compilation wait (add a small buffer).
-    transport_timeout = int(timeout) + 10
+    transport_timeout = int(math.ceil(timeout)) + 10
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Server/src/cli/commands/editor.py` at line 42, Replace the truncating
conversion when computing the transport timeout by using math.ceil on the
timeout value so edge cases are handled precisely: change the assignment to
compute transport_timeout = math.ceil(timeout) + 10 (ensure math is imported and
that timeout is a numeric value or converted to float first); update the code
around the transport_timeout and timeout variables accordingly to avoid
truncation from int().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Server/src/cli/commands/editor.py`:
- Line 42: Replace the truncating conversion when computing the transport
timeout by using math.ceil on the timeout value so edge cases are handled
precisely: change the assignment to compute transport_timeout =
math.ceil(timeout) + 10 (ensure math is imported and that timeout is a numeric
value or converted to float first); update the code around the transport_timeout
and timeout variables accordingly to avoid truncation from int().

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49f8730b-48f0-41ca-bc7d-db5bb4c47035

📥 Commits

Reviewing files that changed from the base of the PR and between 49b749a and 3e5c14a.

📒 Files selected for processing (8)
  • .claude/skills/unity-mcp-skill/references/tools-reference.md
  • Server/src/cli/CLI_USAGE_GUIDE.md
  • Server/src/cli/commands/editor.py
  • Server/src/services/tools/manage_editor.py
  • Server/tests/integration/test_manage_editor_wait.py
  • docs/guides/CLI_EXAMPLE.md
  • docs/guides/CLI_USAGE.md
  • unity-mcp-skill/references/tools-reference.md

Document the 1-120 second wait_for_compilation timeout clamp in the tool, CLI, and references so callers know larger values are not honored. Round the CLI transport timeout up before adding its buffer so fractional waits are covered precisely.

Made-with: Cursor
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Server/src/cli/commands/editor.py`:
- Around line 44-46: The code uses the raw timeout option when calling
run_command and computing transport_timeout; clamp the timeout to the
server-allowed range (1..120) first and then use that clamped value for both the
payload and transport timeout calculation (i.e., replace uses of timeout in the
call to run_command("manage_editor", {"action":"wait_for_compilation","timeout":
timeout}, ...) and in transport_timeout = math.ceil(timeout) + 10 with the
clamped_timeout variable), ensuring negative or huge inputs cannot produce
invalid or excessive transport timeouts.
- Around line 48-52: The CLI currently prints an error when the compilation wait
returns {"success": False} but still exits with code 0; update the failure
branch in the editor wait-compile handling (where `result` is checked and
`print_success`/`print_error` are called) to terminate with a non-zero exit code
(e.g., call `sys.exit(1)` or raise `SystemExit(1)`) after calling `print_error`
so callers see a failing exit status when `result.get("success")` is false.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5569b198-997a-4785-9ec1-3c0d69744787

📥 Commits

Reviewing files that changed from the base of the PR and between 3e5c14a and a6d8384.

📒 Files selected for processing (7)
  • .claude/skills/unity-mcp-skill/references/tools-reference.md
  • Server/src/cli/CLI_USAGE_GUIDE.md
  • Server/src/cli/commands/editor.py
  • Server/src/services/tools/manage_editor.py
  • docs/guides/CLI_EXAMPLE.md
  • docs/guides/CLI_USAGE.md
  • unity-mcp-skill/references/tools-reference.md
✅ Files skipped from review due to trivial changes (5)
  • docs/guides/CLI_EXAMPLE.md
  • Server/src/cli/CLI_USAGE_GUIDE.md
  • unity-mcp-skill/references/tools-reference.md
  • .claude/skills/unity-mcp-skill/references/tools-reference.md
  • docs/guides/CLI_USAGE.md

Clamp the wait-compile timeout on the CLI before deriving the transport timeout so invalid or excessive values never reach the request layer. Exit with a non-zero status when compilation waiting fails so shell pipelines stop on timeout.

Made-with: Cursor
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Server/tests/test_cli.py (1)

1102-1114: Also assert lower-bound timeout clamping in this failure-path test.

Since this case passes --timeout -5, add an assertion on the outgoing request payload timeout so negative values are proven to be sanitized before request dispatch.

Proposed test tightening
-        with patch("cli.commands.editor.get_config", return_value=mock_config):
-            with patch("cli.commands.editor.run_command", return_value=wait_response):
+        with patch("cli.commands.editor.get_config", return_value=mock_config):
+            with patch("cli.commands.editor.run_command", return_value=wait_response) as mock_run:
                 result = runner.invoke(cli, ["editor", "wait-compile", "--timeout", "-5"])
 
         assert result.exit_code == 1
         assert "Timed out after 120s waiting for compilation to finish." in result.output
+        mock_run.assert_called_once()
+        args = mock_run.call_args
+        assert args[0][1]["timeout"] == 1.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Server/tests/test_cli.py` around lines 1102 - 1114, The test
test_editor_wait_compile_returns_nonzero_on_failure should also verify that
negative timeouts are clamped before dispatch: patch
cli.commands.editor.run_command as mocked_run_command, call runner.invoke as you
already do with "--timeout -5", then assert mocked_run_command was called and
inspect its call args/kwargs (the timeout kwarg passed to run_command) to ensure
it was sanitized (e.g., timeout >= 0 or equals the expected lower-bound value
used by the implementation) before sending the request. This uses the existing
patches for get_config and run_command and the run_command symbol to locate
where to assert the outgoing timeout.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Server/tests/test_cli.py`:
- Around line 1102-1114: The test
test_editor_wait_compile_returns_nonzero_on_failure should also verify that
negative timeouts are clamped before dispatch: patch
cli.commands.editor.run_command as mocked_run_command, call runner.invoke as you
already do with "--timeout -5", then assert mocked_run_command was called and
inspect its call args/kwargs (the timeout kwarg passed to run_command) to ensure
it was sanitized (e.g., timeout >= 0 or equals the expected lower-bound value
used by the implementation) before sending the request. This uses the existing
patches for get_config and run_command and the run_command symbol to locate
where to assert the outgoing timeout.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e87e59f-2c25-49a8-a7a0-3ca1a720c2e8

📥 Commits

Reviewing files that changed from the base of the PR and between a6d8384 and 4a3c899.

📒 Files selected for processing (2)
  • Server/src/cli/commands/editor.py
  • Server/tests/test_cli.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • Server/src/cli/commands/editor.py

Assert that negative wait-compile timeouts are clamped before dispatch so the CLI test verifies the outgoing request is sanitized as well as returning a non-zero exit code.

Made-with: Cursor
@smuhlaci
Copy link
Author

@Scriptwonder @dsarno what do you think about this PR?

@Scriptwonder
Copy link
Collaborator

I think it could be useful, but my only concern is that LLMs might not call it. During my heavy usage, they do not go sleep, just polling and checking. (Opus 4.6)

Is it possible we can do it as a post-hook for manage_script or manage_shader (any changes that will trigger domain reload)? Just a thought.

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.

Agents sleep after script changes

2 participants