Repository navigation
Log error details on session kill failure - #19381
Conversation
When a session kill operation fails, capture the error name and message in the log to aid debugging and performance issue investigation.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Enriched
session-kill-faileddaemon log —DaemonRequestRouter.killnow spreadsattributionand addserrorNameanderrorso a failed kill's reason is captured in the daemon file log instead of being rethrown silently. - Updated kill-attribution test — the failure case now asserts the exact
errorName: 'Error'anderror: 'kill refused'fields.
The error-extraction idiom mirrors the existing error instanceof Error ? error.name : typeof error pattern in src/main/crash-reporting/process-gone-diagnostics.ts:157, and DaemonFileLog.log already fails open on non-serializable details, so this is safe to ship. Test passes locally.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe daemon’s Merge Risk: ⚪ Minimal · up to Failed session kills now include error details in daemon logs for diagnosis, with coverage verifying the expected fields. No merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description covers the change, rationale, testing, and lack of visual impact. However, the required Linked Issue section contains “N/A,” even though the template requires an issue link, and the full validation command checklist remains incomplete.
✨ Finishing Touches📝 Generate docstrings
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 |

ELI5
When closing a terminal session fails, we now write down why it failed in the logs, so perf/issue investigations have something to look at instead of just "kill failed".
What Changed
session-kill-failedlog inDaemonRequestRouter.kill()now includeserrorNameanderror(message) alongside the existingsessionId/immediate/clientIdattribution.daemon-server-kill-attribution.test.tsto assert the new fields.Why
Kill failures were logged with attribution only and no error details, making it impossible to distinguish failure modes during the Orca perf-issue investigation. Including the error name/message preserves the existing log shape (spread over attribution) while giving debuggability.
Linked Issue
N/A — small observability improvement surfaced during perf-issue debugging.
Visual Proof
N/A — logging-only change, no UI or user-facing behavior change.
Testing
pnpm test src/main/daemon/daemon-server-kill-attribution.test.ts— 3 passed locally (macOS)AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)