fix(agents): recognize streamed tool arguments as watchdog progress - #1566
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughValid tool-argument deltas during an active assistant message now update task activity and renew the idle watchdog. The runner does not expose partial arguments or count them as tool executions or finalized usage. ChangesTool-argument progress
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant AgentRunner
participant ToolArgumentProgress
participant StallWatchdog
AgentRunner->>ToolArgumentProgress: Observe RPC event
ToolArgumentProgress-->>AgentRunner: Report accepted argument progress
AgentRunner->>StallWatchdog: Re-arm idle timeout
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Validated tool-argument progress now renews the idle watchdog without exposing partial arguments or counting execution early. No concrete merge-blocking issue is established; merge readiness remains subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change lets active argument generation continue longer without granting additional tool authority or recording partial arguments. Cancellation and process cleanup remain independent of progress. Broader deployment exposure was not established. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Linked Issue
Refs #1562. The issue has
status:approved; this PR does not claim the historical test-tokens incidents are conclusively reproduced and does not close it automatically.PR Type
Summary
Changes
lib/agents-protocol.tslib/agents-runner.tstests/agents-protocol.test.tstests/agents-runner.test.tsdocs/gentle-agents-activity.mdTest Plan
node --experimental-strip-types --test tests/agents-protocol.test.ts tests/agents-runner.test.ts— 87 passed.pnpm typecheck— passed ratchet, 187 existing diagnostics, no regressions.pnpm run check:runtime-modules— passed, eight generated modules match.git diff --check— passed.pnpm testexceeded 1200 seconds without final summary and printed two prompt-route failures. Their test/handler blobs are identical at base; inherited subagent gating suppresses the primary prompt. No base execution is claimed. Offline-isolated complete rerun passed in 62.3 seconds: 4,040 passed, 41 skipped, zero failures; unit tests, provider contract and runtime harness all passed. Command:env -u GENTLE_PI_AGENTS_CHILD -u GENTLE_PI_AGENTS_PARENT_PERMISSION_FD DO_NOT_TRACK=1 GENTLE_AI_TELEMETRY=0 pnpm test. Isolation affected the test subprocess only; tracked candidate bytes remained unchanged. The earlier timeout cause remains unproven.review-871f8bc5392af676approved and acknowledged. One informational/nonblocking advisory (R3-closed-unannounced-block); no correction required.node scripts/verify-package-files.mjs— passed: 155 files, 69 byte-pinned artifacts.Limitations
Sequence-less RPC cannot distinguish identical chunks from replay; duplicate hashes conservatively do not renew liveness. Tracking is capped at 4096 fingerprints per assistant message. Continuous valid progress may extend a run indefinitely; budgets constrain silence, not total duration.
Contributor Checklist
type:*label:type:bug.6e4f0b5716144fa62559b09117fed5b093e1b840: CI verify/macOS/Windows and Windows Hidden Internal Processes Ubuntu/Windows all passed. Packed-installation checks passed in CI. Optional CodeRabbit was not awaited.243 authored changed lines. Maintainer authorized merge after mandatory checks without waiting for optional CodeRabbit review.
Summary by CodeRabbit
Bug Fixes
Documentation