Skip to content

Expose harness role/slug as always-injected FULLSEND_ROLE/FULLSEND_SLUG sandbox env vars #6045

Description

@ralphbean

Working on fullsend-ai/agents#709, we hit a case where a skill needs to know its own harness identity at runtime — specifically, skills/pr-review/SKILL.md needs to recognize which GitHub App posted a given comment, so it can tell "the review bot's own prior finding" apart from an unrelated human comment.

The obvious way to do that is to compare comment.user.login against the app's slug. But if we hardcode that slug as a literal string in the skill, it silently breaks for any repo that overrides role/slug in a customized harness YAML — the skill and the harness file drift apart with no signal that they've done so.

h.Role and h.Slug are already parsed onto the Harness struct (internal/harness/harness.go), and bootstrapEnv() in internal/cli/run.go already always-injects a handful of FULLSEND_* infra vars into the sandbox regardless of env.sandbox (FULLSEND_OUTPUT_DIR, FULLSEND_TARGET_REPO_DIR, FULLSEND_FETCH_URL, etc.) — reservedSandboxKeys stops env.sandbox from shadowing them.

Proposing we extend that same list with FULLSEND_ROLE (from h.Role) and FULLSEND_SLUG (from h.Slug, when set), registered in reservedSandboxKeys the same way. That gives skills a way to reference their own harness identity without ever risking drift from the harness file.

fullsend-ai/agents#709 is blocked on this — it currently has to fall back to pattern-matching on user.login for the app-identity check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/harnessAgent harness, config, and skills loadingfeatureFeature-category issue awaiting human prioritizationpriority/mediumNormal priority, plan for next cycletriagedTriaged but awaiting human prioritization

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions