fix(ai-red-teaming): scope get_session_context to AIRT + make it pull-only (CAP-1169) - #109
Merged
Merged
Conversation
…-only (CAP-1169) get_session_context's docstring said "use this at the start of follow-up commands", which primed agents to open with it — including on non-red-teaming tasks when the AIRT capability is co-attached (agents spin on non-AIRT primitives / odd in demos). Reword to pull-only, red-teaming-only, resume-aid wording (do NOT call to start; not relevant to non-red-teaming work), soften the empty-return to "proceed with the task directly", and scope the agent-prompt description accordingly. No behavior change when genuinely resuming an attack.
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.
Closes CAP-1169.
Problem
get_session_context's docstring said "use this at the start of follow-up commands… so you can build on previous attacks" — a push instruction that primed agents to open with it. When the AIRT capability is co-attached with another (e.g. web-security), the agent reaches for this AIRT tool first even on non-red-teaming primitives → occasional spins + odd demos. The goal is to stop that without temporarily disabling AIRT.Change (priming fix — pull-only + AIRT-scoped by description)
get_session_contextdocstring: pull-only, red-teaming-only, resume aid — call ONLY to continue a prior attack (try another attack / add transforms); do NOT call to start a task; not relevant to non-red-teaming work."No prior red-teaming session. Nothing to resume — proceed with the task directly."(was "Run an attack first…", which invited a spin).No behavior change when genuinely resuming an AIRT attack.
Scope note (soft vs hard)
This is a description/priming fix — the tool is still present in the toolset, but its wording steers the agent away from it for non-AIRT tasks. If we want it hard-hidden when a non-AIRT capability is selected, that's a follow-up at the capability-loader level (conditional tool exposure by active capability), not something a docstring controls.