Visitar URL original
cli/neo: set AI_AGENT=neo for shell-tool child processes by VenelinMartinov · Pull Request #23251 · pulumi/pulumi · GitHub
Skip to content

cli/neo: set AI_AGENT=neo for shell-tool child processes - #23251

Merged
VenelinMartinov merged 2 commits into
masterfrom
vvm/neo-shell-ai-agent
May 19, 2026
Merged

VenelinMartinov merged 2 commits into
masterfrom
vvm/neo-shell-ai-agent

Conversation

@VenelinMartinov

@VenelinMartinov VenelinMartinov commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Set AI_AGENT=neo on the env of every child process spawned by Neo's shell tool
  • Override (not append): a pre-existing AI_AGENT in the parent (e.g. claude when Neo is launched from inside Claude Code) is stripped, then AI_AGENT=neo is appended.

Test plan

  • cd pkg && go test -count=1 -tags all ./cmd/pulumi/neo/tools/...
  • mise exec -- make lint (0 issues)
  • Manual: launch pulumi neo from inside Claude Code, have the agent shell_execute printenv AI_AGENT — expect neo

Shell commands run by Neo previously inherited AI_AGENT from the parent
process. Nested `pulumi` invocations were then attributed in telemetry
to whatever upstream agent launched `pulumi neo` (or to nothing), with
no signal that Neo drove the run.

Override AI_AGENT to "neo" when spawning the child so its
metadata.DetectAIAgent picks "neo", matching the telemetry shape that
`pulumi preview`/`pulumi up` emit when AI_AGENT is set explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@VenelinMartinov VenelinMartinov added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label May 18, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@VenelinMartinov
VenelinMartinov marked this pull request as ready for review May 19, 2026 06:19
@VenelinMartinov
VenelinMartinov requested a review from a team as a code owner May 19, 2026 06:19

@julienp julienp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@VenelinMartinov
VenelinMartinov added this pull request to the merge queue May 19, 2026
Merged via the queue into master with commit e836499 May 19, 2026
15 checks passed
@VenelinMartinov
VenelinMartinov deleted the vvm/neo-shell-ai-agent branch May 19, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/no-changelog-required This issue doesn't require a CHANGELOG update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants