Skip to content

Hide /pr-comments skill from autonomous cloud agents#13250

Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
oz/hide-pr-comments-for-cloud-agents
Draft

Hide /pr-comments skill from autonomous cloud agents#13250
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
oz/hide-pr-comments-for-cloud-agents

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown
Contributor

Description

Hides the /pr-comments bundled skill from autonomous cloud agents (and CLI runs), so it no longer appears in the cloud agent slash menu or gets invoked there.

Reported in factory-client triage: in a cloud Oz conversation, commands invoked by /pr-comments repeatedly showed as cancelled (with the agent retrying in a loop) even though the user never hit ctrl-c.

Root cause

Two interacting facts:

  1. /pr-comments is an inherently interactive, local-only workflow — it runs a fetch script and then calls insert_code_review_comments to render a review UI and wait for the user. In an autonomous cloud run there is no review UI or user, so the skill doesn't make sense there.
  2. Its slow, network-bound commands cross the 2s long-running-command threshold and become long-running blocks. In autonomous mode the next requested command returns CancelledBeforeExecution, which is dropped (CancelledBeforeExecution → Ignore, crates/ai/src/agent/action_result/convert.rs). The tool call then reaches the server unresolved, and the server synthesizes a Cancel result for it to keep the LLM turn valid (warp-server .../runtime/interceptors/input.go cancelledResultsForIncompleteToolCallsInLastResponse). On resume the agent sees "previous command was cancelled" and retries → the loop.

This PR addresses (1) — the reporter's requested fix — by not surfacing the skill to cloud agents. The general autonomous cancel-then-retry loop in (2) is a separate, deeper issue (client result-handling + server reconciliation) and will be tracked separately rather than bundled here.

What changed

  • New BundledSkillActivation::RequiresInteractiveApp variant, enabled only when AppExecutionMode is not autonomous (i.e. the interactive desktop app, not the cloud-agent daemon or CLI).
  • pr-comments now uses this activation in activation_for_bundled_skill, so it is excluded from the bundled-skill catalog/slash menu in autonomous runs and from the remote-daemon catalog snapshot, while remaining fully available in the local app.

Linked Issue

N/A (reported via factory-client Slack triage).

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below.

Testing

  • Added a unit test (pr_comments_is_gated_to_the_interactive_app) asserting pr-comments resolves to RequiresInteractiveApp and that ordinary skills stay Always.

  • ./script/format was run.

  • Build / clippy / full UI verification could not be completed in the factory environment — compiling the warp client crate was OOM-killed (SIGKILL) due to memory limits. Please rely on CI to validate the build, clippy, and tests.

  • This change is not observable in the local desktop app (where /pr-comments still appears as before); it only gates the autonomous cloud-agent / CLI surfaces, which can't be exercised in a local desktop build. Reviewer/CI validation of the cloud surface is appreciated.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/1857b604-1670-4407-bbcf-8cda474e0df5

Run: https://oz.staging.warp.dev/runs/019f19b8-994f-756a-97ae-89b2458be3bd

This PR was generated with Oz.

The /pr-comments bundled skill renders an interactive code-review UI (via
insert_code_review_comments) and then waits for the user. In autonomous
cloud-agent / CLI runs there is no review UI or user to wait for, and its slow,
network-bound fetch commands cross the long-running-command threshold, which in
autonomous mode leaves the tool call unresolved and triggers a server-side
cancel-then-retry loop.

Gate the skill to the interactive desktop app: add a RequiresInteractiveApp
bundled-skill activation (enabled only when AppExecutionMode is not autonomous)
and apply it to pr-comments. This removes it from the cloud agent's bundled-skill
catalog and slash menu, while leaving it fully available in the local app.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant