What happens
When the code agent opens a pull request, the PR author is the fullsend-ai-coder GitHub App. GitHub does not allow assigning that app user on PRs in our repos (replaceActorsForAssignable fails for app/fullsend-ai-coder and fullsend-ai-coder[bot]).
The PR therefore stays unassigned unless someone assigns it manually. In practice, many agent PRs sit in the backlog with no assignee, which makes ownership unclear for review and triage.
This is separate from #1838, which proposes assigning the issue to the coding agent. This issue is about assigning the PR to a human using the same ownership signals we use when triaging manually.
What should happen
After post-code.sh creates or updates a PR for issue #N, the post-script should assign the PR to a human GitHub user using this precedence (first match wins):
- Person who invoked
/fs-code on the issue (when the run was triggered by that slash command)
- Issue assignee (first human assignee, if any)
- Issue reporter (human issue author)
Rules:
- Never assign bots or GitHub Apps (
app/*, *[bot], dependabot, etc.).
- If no human matches the precedence chain, leave the PR unassigned (do not guess from unrelated PRs or retro context).
- When updating an existing PR branch (PR already exists), apply the same assignment logic if the PR has no assignees yet.
- Assignment must be best-effort: log and continue if
gh pr edit --add-assignee fails (e.g. user lacks permission), without failing the workflow.
Context
Manual triage on fullsend-ai/fullsend (2026-06-04) used this precedence on ~30 unassigned PRs. Human-authored PRs map cleanly to their authors; bot-authored PRs need the chain above. Examples that worked well:
Cases that should remain unassigned under this policy: retro-only issues with no human author, assignee, or /fs-code invoker (e.g. issues filed by app/fullsend-ai-retro with no human comment).
Implementation notes (for implementers)
This should be implementable deterministically in post-code.sh (no LLM), immediately after gh pr create / when reusing an existing PR:
post-code.sh already has ISSUE_NUMBER, REPO_FULL_NAME, PUSH_TOKEN, and gh access.
- Issue assignee and author are available via
gh issue view "${ISSUE_NUMBER}" --json assignees,author.
/fs-fix already plumbs TRIGGER_SOURCE from dispatch through reusable-fix.yml into its post-script; /fs-code does not set TRIGGER_SOURCE today even though dispatch has COMMENT_USER_LOGIN for issue_comment events. Consider mirroring the fix-agent plumbing (dispatch.yml → reusable-dispatch.yml → reusable-code.yml → harness/code.yaml runner_env) so label-triggered runs fall through to assignee/reporter only.
- For
ready-to-code label triggers, precedence steps 2–3 apply; step 1 is N/A unless TRIGGER_SOURCE is also set for authorized label appliers in a follow-up.
Relevant files:
internal/scaffold/fullsend-repo/scripts/post-code.sh (PR create path ~section 8)
internal/scaffold/fullsend-repo/harness/code.yaml (runner_env)
internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml (/fs-code routing)
.github/workflows/reusable-code.yml and reusable-dispatch.yml
Add shell tests in post-code-test.sh for the resolver (bot filtering, precedence, no-op when all candidates are bots).
What happens
When the code agent opens a pull request, the PR author is the
fullsend-ai-coderGitHub App. GitHub does not allow assigning that app user on PRs in our repos (replaceActorsForAssignablefails forapp/fullsend-ai-coderandfullsend-ai-coder[bot]).The PR therefore stays unassigned unless someone assigns it manually. In practice, many agent PRs sit in the backlog with no assignee, which makes ownership unclear for review and triage.
This is separate from #1838, which proposes assigning the issue to the coding agent. This issue is about assigning the PR to a human using the same ownership signals we use when triaging manually.
What should happen
After
post-code.shcreates or updates a PR for issue#N, the post-script should assign the PR to a human GitHub user using this precedence (first match wins):/fs-codeon the issue (when the run was triggered by that slash command)Rules:
app/*,*[bot],dependabot, etc.).gh pr edit --add-assigneefails (e.g. user lacks permission), without failing the workflow.Context
Manual triage on fullsend-ai/fullsend (2026-06-04) used this precedence on ~30 unassigned PRs. Human-authored PRs map cleanly to their authors; bot-authored PRs need the chain above. Examples that worked well:
/fs-codedispatcher → PR assignee (e.g. issue reconcile-repos: enrollment commits lack a body, causing gitlint failures in onboarded repos #1824 → PR fix(#1824): add body to enrollment commit messages #1825)Cases that should remain unassigned under this policy: retro-only issues with no human author, assignee, or
/fs-codeinvoker (e.g. issues filed byapp/fullsend-ai-retrowith no human comment).Implementation notes (for implementers)
This should be implementable deterministically in
post-code.sh(no LLM), immediately aftergh pr create/ when reusing an existing PR:post-code.shalready hasISSUE_NUMBER,REPO_FULL_NAME,PUSH_TOKEN, andghaccess.gh issue view "${ISSUE_NUMBER}" --json assignees,author./fs-fixalready plumbsTRIGGER_SOURCEfrom dispatch throughreusable-fix.ymlinto its post-script;/fs-codedoes not setTRIGGER_SOURCEtoday even though dispatch hasCOMMENT_USER_LOGINforissue_commentevents. Consider mirroring the fix-agent plumbing (dispatch.yml→reusable-dispatch.yml→reusable-code.yml→harness/code.yamlrunner_env) so label-triggered runs fall through to assignee/reporter only.ready-to-codelabel triggers, precedence steps 2–3 apply; step 1 is N/A unlessTRIGGER_SOURCEis also set for authorized label appliers in a follow-up.Relevant files:
internal/scaffold/fullsend-repo/scripts/post-code.sh(PR create path ~section 8)internal/scaffold/fullsend-repo/harness/code.yaml(runner_env)internal/scaffold/fullsend-repo/.github/workflows/dispatch.yml(/fs-coderouting).github/workflows/reusable-code.ymlandreusable-dispatch.ymlAdd shell tests in
post-code-test.shfor the resolver (bot filtering, precedence, no-op when all candidates are bots).