Skip to content

improvement(agent-vault): mint sessions with accessBundle - #481

Merged
saifsmailbox98 merged 2 commits into
mainfrom
saif/age2-282-make-a-session-use-one-access-bundle-instead-of-a-list
Nov 4, 2026
Merged

saifsmailbox98 merged 2 commits into
mainfrom
saif/age2-282-make-a-session-use-one-access-bundle-instead-of-a-list

Conversation

@saifsmailbox98

@saifsmailbox98 saifsmailbox98 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Description 📣

agent-vault run --access-bundle now mints with accessBundle: "<name>" instead of accessBundles: ["<name>"], matching the session API change in Infisical/infisical#9099. The flag, the env var and the "pass it once" check are unchanged.

Merge after Infisical/infisical#9099 is deployed to Cloud: a server without it rejects accessBundle with a 422. Servers with it still accept the old list, so older CLIs keep working.

Related: Infisical/python-sdk-official#67, Infisical/agent-reference-architectures#4

AGE2-282

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cli-481-improvement-agent-vault-mint-sessions-with-accessbundle

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@linear

linear Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

AGE2-282

AGE2-315

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge after the stated Cloud deployment requirement is met.

Summary

Changes session creation to send accessBundle as one string instead of accessBundles as a list.

  • agent-vault run sends one bundle name when it mints a session.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Beyond the inline finding, I also checked accessBundles[0] in agent_vault_run.go for an empty-slice panic and for silently dropped bundles. It's safe on both counts: the mint only runs inside if len(accessBundles) > 0, and an earlier len(accessBundles) > 1 check already rejects more than one bundle.

Extended reasoning...

The change switches the session-mint request from an accessBundles list to a single accessBundle string and sends only the first element. The guards at lines 258 and 373 of packages/cmd/agent_vault_run.go rule out the out-of-range index and any silent loss of extra bundles.

Comment thread packages/api/agent_vault.go Resolved
…session-use-one-access-bundle-instead-of-a-list

# Conflicts:
#	packages/api/agent_vault.go
#	packages/cmd/agent_vault_run.go

@scott-ray-wilson scott-ray-wilson 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

@saifsmailbox98
saifsmailbox98 merged commit 42e316e into main Nov 4, 2026
34 checks passed
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.

2 participants