Prototype agent session start in Shopify CLI#7584
Draft
dmerand wants to merge 1 commit into
Draft
Conversation
81ecf37 to
17c8c0a
Compare
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.
What
Prototype CLI-owned agent session state.
This PR adds:
shopify agent session startcli-kitSHOPIFY_CLI_AGENT_*env vars are absentmetricsMode=offapp releaseWhy
ai-toolkit-sourcecurrently attributes agent-run Shopify CLI commands by prefixing each command withSHOPIFY_CLI_AGENT_INFOandSHOPIFY_CLI_AGENT_IDS. That works, but it is noisy, token-expensive, and harness-specific.This prototype tests a different shape: start one agent session in Shopify CLI, persist it there, and let later CLI commands reuse that state for attribution and behavior.
app releaseis the default-mode proof because it already has an established non-interactive path through--allow-updates. Reusing that seam makes the prototype easier to evaluate: it shows that agent session state can affect later CLI behavior without inventing a new global--no-inputcontract or taking on a larger command surface likeapp init.Behavior
shopify agent session startpersists:defaultNonInteractiveSHOPIFY_CLI_AGENT_INFO/SHOPIFY_CLI_AGENT_IDSfrom persisted session state when explicit env vars are absentmetricsMode=offsuppresses command analytics for this prototype pathdefaultNonInteractive=trueand the user passed no explicit release-control flags,app releasefollows its existing non-interactive--allow-updatespathBoundaries
This PR does not:
--no-inputcontractThe goal is to demonstrate the value of CLI-owned agent session state clearly.
Manual testing
Start a session and inspect the stored shape:
Confirm later CLI analytics can pick up packed agent attribution without explicit
SHOPIFY_CLI_AGENT_*env vars.Then start a non-interactive session:
Then verify:
uses the prototype agent-mode path without requiring an explicit
--allow-updates.