[codex] add agent approval protocol and work console trust surface#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e82e5e581
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fetch(`${apiBase}?limit=${SESSION_RENDER_LIMIT}`, { | ||
| method: 'GET', | ||
| signal: controller.signal, | ||
| }) |
There was a problem hiding this comment.
Include auth headers in Work Console requests
The new /api/work-sessions routes all enforce isRequestAuthorized, but this hook never sends the saved maestro.server.api-token like the other protected dashboard hooks do. In deployments with MAESTRO_SERVER_TOKEN enabled, this initial list request returns 401, and create/send/close use the same unauthenticated pattern, so the Work Console cannot load or manage sessions from the dashboard.
Useful? React with 👍 / 👎.
| const existing = approvalDecisionsByRequestId.get(requestId) || null; | ||
| if (existing) return existing; |
There was a problem hiding this comment.
Allow later operator decisions to replace stale ones
Because this returns the first decision unconditionally, any later operator action for the same request is ignored. A concrete path is an APPROVE whose merge executor fails: markApproveFinished puts the request back in READY and the UI exposes it for another action; if the operator then rejects it, the REJECT handler calls storeApprovalDecision, but this early return leaves the polling endpoint serving the stale approve/merge decision to the agent instead of the rejection.
Useful? React with 👍 / 👎.
Summary
Validation
Notes