Skip to content

delegates/coding_agent: an env-removal seam for spawned coders — plugins can't sanitize a coder's inherited environment without mutating the host #2117

Description

@mabry1985

Why

projectBoard-plugin needs the coder subprocess to NOT inherit the host's identity/credential env (PROTOAGENT_*, A2A_AUTH_TOKEN, AGENT_NAME) — an arbitrary coding agent working on arbitrary repo code shouldn't hold the host's A2A bearer, and inherited scoping vars break target-repo test suites (projectBoard-plugin#78).

The first attempt (plugin PR #81) had no seam to hand a sanitized env to the ACP spawn, so it scrubbed os.environ in place at loop start — which gutted the live host: the server lost PROTOAGENT_HOME, and a graceful POST /api/restart re-execed as the default instance and died. Reverted in plugin PR #83; coder env is back to full inheritance.

Ask

Give the delegate/coding_agent spawn path an environment-shaping seam a caller can use per dispatch:

  • env_remove: [names or prefixes] (subtractive — the missing half), alongside the existing additive per-delegate env: map, or
  • an optional full env= replacement on the spec the board loop passes when it dispatches a workdir-scoped coder.

Precedent: the host already strips CLAUDECODE* for nested Claude Code delegates — same shape, host-side, correctly scoped to the child. Dovetails with #2114 (console env editor for delegates): the same schema field serves both.

Refs: projectBoard-plugin#78, #81 (the regression), #83 (the revert), protoAgent#2114.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-infoIssue is missing required sections — see CONTRIBUTING.md (silent issue gate).team-readyTriaged and approved for autonomous team dispatch — the ONLY intake gate the board pipeline accepts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions