- Remove mode=mode.value from trace_span calls (trace_span only accepts
name and logger parameters)
- Add TestPermissionModeIntegration tests that verify mode string->enum
conversion works correctly through the full request flow
- Add TestAgentMethodSignatures tests that verify function signatures
match expected interfaces (catches invalid kwargs at test time)
These tests would have caught both the mode string/enum issue and the
trace_span invalid kwarg issue before they hit production.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>