Skip to content

Server: session-manager.ts cleanup + grant request tracking#185

Closed
SuuBro wants to merge 1 commit intogoal/simplify-t-703f66e2from
goal-goal-simplify-t-703f66e2-coder-c750067f
Closed

Server: session-manager.ts cleanup + grant request tracking#185
SuuBro wants to merge 1 commit intogoal/simplify-t-703f66e2from
goal-goal-simplify-t-703f66e2-coder-c750067f

Conversation

@SuuBro
Copy link
Copy Markdown
Owner

@SuuBro SuuBro commented Apr 1, 2026

Remove old tool denial detection mechanisms and add grant request tracking for the new tool_call guard architecture.

Removed:

  • permissionBroadcastSent flag from SessionInfo
  • Error regex matching block (~70 lines) that detected tool denials from tool_execution_end/message_end events
  • Policy-to-mode override logic in grantToolPermission (always-ask→one-time, ask-once→session-only)
  • never-ask/never filtering of newTools in grantToolPermission

Added:

  • pendingGrantRequest field on SessionInfo for guard extension long-poll tracking
  • requestToolGrant() method: creates pending request, broadcasts tool_permission_needed to UI, returns promise resolved by grantToolPermission or after 5-minute timeout
  • Pending grant resolution at end of grantToolPermission flow

🤖 Generated with Bobbit

- Remove permissionBroadcastSent flag from SessionInfo
- Remove error regex matching block (~70 lines) that detected tool denials
  from tool_execution_end/message_end events
- Remove policy-to-mode override logic in grantToolPermission (always-ask→
  one-time, ask-once→session-only) — user's chosen mode now respected directly
- Remove never-ask/never filtering of newTools in grantToolPermission
- Add pendingGrantRequest tracking to SessionInfo for guard extension long-poll
- Add requestToolGrant() method: creates pending request, broadcasts
  tool_permission_needed to UI clients, returns promise resolved by
  grantToolPermission or after 5-minute timeout
- Resolve pending grant request at end of grantToolPermission flow

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
@SuuBro SuuBro closed this Apr 2, 2026
@SuuBro SuuBro deleted the goal-goal-simplify-t-703f66e2-coder-c750067f branch April 9, 2026 12:23
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.

2 participants