Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Refine session error classification and paths

8 months ago

0e70a60
Authored
mweinbach2/14/2026, 4:36:12 PM
Introduce a reusable includesAny helper to consolidate string checks in AgentSession.classifyTurnError, add handling for "glob blocked:" as a permission_denied case, and adjust validation/backup matching order to correctly classify "unknown checkpoint id", "is required" and "invalid" messages. In sessionBackup, normalize Windows-style backslashes and duplicate slashes in diff patch paths and prefer manifest checkpoints on Windows (early throw) to avoid unreliable diffs. Add tests covering glob guard rejections mapping to permission_denied and backup errors containing "invalid" being classified as backup_error.

Parent180b6e2

3 files changed
  • src/server/session.ts+19−11
  • src/server/sessionBackup.ts+6−1
  • test/session.test.ts+32−0