Skip to content

feat: agent callback updates and mission spec skill_id support#57

Merged
jeremylongshore merged 2 commits intomainfrom
feature/agent-mission-spec-updates
Jan 10, 2026
Merged

feat: agent callback updates and mission spec skill_id support#57
jeremylongshore merged 2 commits intomainfrom
feature/agent-mission-spec-updates

Conversation

@jeremylongshore
Copy link
Copy Markdown
Collaborator

Summary

  • Agent callbacks: Updated auto_save_session_to_memory across all 10 IAM agents to support both old and new ADK callback API signatures
  • Mission Spec: Added optional skill_id field to workflow steps for explicit skill invocation

Changes

Agent Callback Updates

  • Support both ctx (old) and callback_context (new) API
  • Handle invocation_context vs _invocation_context attribute access
  • Graceful fallback when no context provided

Mission Spec Enhancement

  • New skill_id field in WorkflowStep schema
  • Compiler and runner pass skill_id when invoking agents
  • Updated sample mission YAML with examples

Test Plan

  • Verify agents still function with new callback signatures
  • Test mission runner with explicit skill_id
  • Run existing tests: make test

🤖 Generated with Claude Code

jeremylongshore and others added 2 commits January 10, 2026 01:46
Update auto_save_session_to_memory callback across all IAM agents:
- Support both old (ctx) and new (callback_context) API
- Handle invocation_context vs _invocation_context attribute
- Add graceful fallback when no context provided

Affected agents: bob, iam-adk, iam-cleanup, iam-doc, iam-fix-impl,
iam-fix-plan, iam-index, iam-issue, iam-qa, iam-senior-adk-devops-lead

Co-Authored-By: Claude <noreply@anthropic.com>
- Add optional skill_id field to WorkflowStep schema
- Update compiler to pass skill_id when invoking agents
- Enhance runner with skill_id parameter handling
- Update sample mission YAML with skill_id examples

This allows missions to specify exactly which skill to invoke
rather than relying on agent defaults.

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @jeremylongshore, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant improvements to agent callback handling and mission specification. It ensures that agent callbacks, specifically for session saving, are robust against changes in the ADK API by supporting multiple context signatures. Concurrently, the Mission Spec has been enhanced to provide more precise control over agent execution by enabling direct specification of the skill to be invoked for each workflow step, moving beyond implicit skill resolution.

Highlights

  • Agent Callback API Compatibility: The auto_save_session_to_memory callback function across all 10 IAM agents has been updated to gracefully handle both the old (ctx) and new (callback_context) ADK API signatures, ensuring backward and forward compatibility.
  • Mission Spec Skill ID Support: A new optional skill_id field has been introduced to WorkflowStep in the Mission Spec, allowing for explicit invocation of specific agent skills within a workflow, overriding default skill patterns.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two main features: backward compatibility for agent callbacks and support for an explicit skill_id in mission specs. The changes for skill_id look good, though there's a minor improvement opportunity in exception handling. However, there is a critical copy-paste bug across 9 of the 10 updated agent files in the auto_save_session_to_memory callback. The logic to save the session is only implemented for the old callback signature, causing it to fail with the new API. I've left detailed comments with suggestions to fix this widespread issue.

Comment on lines +201 to +202
except Exception:
skill_id = f"{agent.replace('-', '_')}.execute" # Fallback on error
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The except Exception: block is too broad and silently falls back to the default skill_id. This can hide underlying issues, such as a missing AgentCard file or a malformed one. It's better to catch specific exceptions or at least log the exception that occurred to aid in debugging.

Suggested change
except Exception:
skill_id = f"{agent.replace('-', '_')}.execute" # Fallback on error
except Exception as e:
logger.warning(f"Could not determine primary skill for agent '{agent}' from its AgentCard: {e}. Falling back to default skill pattern.")
skill_id = f"{agent.replace('-', '_')}.execute" # Fallback on error

@jeremylongshore jeremylongshore merged commit 93c45de into main Jan 10, 2026
29 checks passed
@jeremylongshore jeremylongshore deleted the feature/agent-mission-spec-updates branch January 10, 2026 08:02
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