fix(workflow-executor): sign agent JWT with snake_case identity claims (PRD-432)#1620
Open
christophebrun-forest wants to merge 1 commit into
Open
Conversation
…s (PRD-432) The executor mints the JWT it sends to the agent from StepUser (camelCase). Ruby/Python agents splat JWT claims straight into Caller.new, which requires snake_case kwargs (first_name, last_name, rendering_id, permission_level), so the call failed with a 500 ArgumentError. The TS agent reads camelCase. There is no single canonical casing, so emit both: the Ruby Caller absorbs the extra camelCase keys via **_extra_args and the TS agent ignores the snake_case ones. fixes PRD-432 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (1)
🛟 Help
|
hercemer42
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The executor mints the JWT it sends to the agent from
StepUser(camelCase). Ruby/Python agents splat JWT claims straight intoCaller.new, which requires snake_case kwargs (first_name,last_name,rendering_id,permission_level). The camelCase-only token made that call fail with a 500ArgumentError.The TypeScript agent reads camelCase, so there is no single canonical casing.
Fix
Emit both casings in the signed JWT:
Callerabsorbs the extra camelCase keys via**_extra_args.Only the 4 multi-word identity fields get aliases —
id,email,team,role,tagsare already identical across casings.Testing
scope) are present.yarn workspace @forestadmin/workflow-executor test→ 35/35 pass.fixes PRD-432
🤖 Generated with Claude Code
Note
Sign agent JWTs with snake_case identity claims in
AgentClientAgentPort.createClientAdds
first_name,last_name,rendering_id, andpermission_levelsnake_case fields to the JWT payload alongside the existing camelCase equivalents. Adds a test suite in agent-client-agent-port.test.ts that verifies both camelCase and snake_case claims and the expected scope are present in the signed token.Macroscope summarized 74349e2.