Skip to content

copilot: stop sending empty agent-assignment strings and report session detection honestly - #3297

Open
Flanxiyum001 wants to merge 1 commit into
github:mainfrom
Flanxiyum001:patch-4
Open

Flanxiyum001 wants to merge 1 commit into
github:mainfrom
Flanxiyum001:patch-4

Conversation

@Flanxiyum001

Copy link
Copy Markdown

Related to #3283

Hardening changes for the Copilot assignment tools, from the investigation in
#3283. The root cause (object-form assignees silently dropping the agent
assignment in the intent processor) is server-side; this PR fixes the
client-side issues identified there.

  • AgentAssignmentInput no longer sets CustomAgent/CustomInstructions to
    pointers of "". Since omitempty on *githubv4.String only drops nil
    pointers, "customAgent": "" was reaching the wire on both assign tools,
    while the working manual/UI path omits these fields entirely.
  • When no linked PR appears within the poll window, both tools now return
    agent_session_detected: false with an explicit warning message instead of
    an unqualified "successfully assigned … pull request pending", so callers
    stop treating a dead session as success. On success,
    agent_session_detected: true is reported.

Refactor agent assignment input preparation to avoid unnecessary empty string pointers and improve clarity. Update success messages to reflect the actual state of pull request creation.
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.

1 participant