Skip to content

droid: fold failed tool calls from the session log on 1.12.x - #235

Open
Dani (Dani-Google) wants to merge 5 commits into
microsoft:mainfrom
Dani-Google:droid-fold-failed-calls-231
Open

Dani (Dani-Google) wants to merge 5 commits into
microsoft:mainfrom
Dani-Google:droid-fold-failed-calls-231

Conversation

@Dani-Google

Copy link
Copy Markdown

Fixes #231.

On Droid 1.12.0 and 1.12.1, PostToolUse only fires for successful tool calls, so a failed call never reaches the loop guard and a turn of eight failures records tool_calls: 0. The failures are still in the session log (is_error), so the plugin now folds them from there at the next hook and at Stop, for 1.12.x only — 0.233.0 still dispatches failures, and folding from the log there would count them twice. On an all-failure turn no hook fires at all, so the record is fixed but there is still no mid-turn intervention there.

Tests: five new ones in tests/test_droid.py covering the mixed and all-failure turns from the issue, the ended-green proxy flip on a failed pytest, the 0.233.0 gate, and the new log readers. Full suite: 1005 passed, 17 skipped in tests/; 395 passed, 1 skipped in experiments/tests (one pre-existing cgroup failure, also fails on clean main).

@Dani-Google

Dani (Dani-Google) commented Nov 15, 2026 via email

Copy link
Copy Markdown
Author

@Dani-Google

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree — This is Dani's agreement to Microsoft's Contributor License Agreement, which he has personally approved.

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.

Droid 1.12.x: PostToolUse is not dispatched for failed tool calls — loop guard's live path is inert

1 participant