Skip to content

docs(rule): don't stop simulator servers after every task - #1419

Draft
blazejkustra wants to merge 4 commits into
mainfrom
docs/rule-no-stop-per-task
Draft

blazejkustra wants to merge 4 commits into
mainfrom
docs/rule-no-stop-per-task

Conversation

@blazejkustra

@blazejkustra blazejkustra commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Agents read the rule as "stop simulator servers at the end of every task". Each stop makes the next task's first action start cold: on an iOS simulator a tap took 2.7 s instead of 0.44 s.

Approach

Don't stop them when a task finishes; stop them when the user asks, the session ends, or a skill says to recycle a device. Same wording in the rule, MCP instructions and the stop tools' descriptions.

Tests

  • This changes instructions every agent reads, so it needs a maintainer's explicit sign-off.
  • Measured on main, iPhone 17 Pro simulator, Settings app: a warm gesture-tap took 0.44 s (median of 3); after a scoped stop-all-simulator-servers, the next tap took 2.67 / 2.70 / 2.75 s. So each task's first action pays about 2.3 s again.
  • The skill-prescribed recycles (QA proof passes, devtools recovery) are still allowed; stop-simulator-server and stop-metro descriptions no longer tell agents to stop at the end of a task.
  • Not measured: whether agents now skip the stop in practice (needs an agent run).
  • prettier, eslint, knip, argent-mcp tests (120) and the full tool-server suite with tsc pass. No test snapshots this text.
  • No docs change needed: the docs don't describe when to stop servers.

Screenshots

Stopping them at each task end makes the next task's first device action
start cold. Stop them only when the user asks to clean up or ends the
session, still scoped to this session's devices; never stop a user's Metro
unless asked. Updated in the rule, the MCP server instructions and the
stop-all-simulator-servers description.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@latekvo latekvo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Diplomat, Sonnet 5.5]: Review of 0d67cb3. I covered claims vs code, the nearest-twin and absence pass across every skill, tool description, CLI, installer and docs surface that says when to stop services, non-happy paths and lifetime (idle timeouts, reaping, stale services), and mutation.

What I ran:

  • A mutation of each of the three changed strings: every mutant survived.
  • argent-mcp tests (120) and the related tool-server suites (198): all pass.
  • SpiderShield locally: the mean is unchanged at 9.1622, and this tool scores 10.0 before and after.
  • The built MCP server over stdio: its initialize result carries the new instructions.
  • On a booted iOS simulator: reproduced the cold-start premise (0.054 s warm tap vs 1.14 s after a scoped stop, 3 cycles), then rebooted the simulator under live services.

Two inline comments. Pre-existing problems found along the way are filed separately as #1422 (stale native devtools after a quick simulator reboot, which this PR makes the default path more often) and #1423 (the documented idle-timeout default does not match auto-spawned servers).

Comment thread packages/tool-server/src/tools/simulator/stop-all-simulator-servers.ts Outdated
Comment thread packages/skills/rules/argent.md

@latekvo latekvo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Diplomat, Opus 5.5]: Second pass on 0d67cb3. I covered claims vs code; the nearest-twin and absence sweep over skills, tool descriptions, docs, CLI and installer rule copies; the lifetime of services left running (idle timeouts, MCP keepalive, debugger eviction by DevTools, profiler and recording caps); and a grep for tests that pin the changed strings (none do). One new inline comment.

Comment thread packages/skills/rules/argent.md
…-task

# Conflicts:
#	packages/tool-server/src/tools/simulator/stop-all-simulator-servers.ts
#	packages/tool-server/src/tools/simulator/stop-metro.ts
# Conflicts:
#	packages/tool-server/src/tools/simulator/stop-all-simulator-servers.ts

This branch has not been deployed

No deployments
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.

2 participants