Skip to content

Agent CLI build and deploy guide: captures the contract ID the CLI's own skill says not to #2980

Done

Description

@oceans404

Page: https://developers.stellar.org/docs/tools/cli/agent-cli/guides/build-and-deploy-contracts
File: docs/tools/cli/agent-cli/guides/build-and-deploy-contracts.mdx:53

What's wrong:
Step 3 deploys with ID=$(stellar contract deploy ... --alias hello_world). $ID is never used afterwards (later steps use --id hello_world), and the CLI's built-in skill tells agents: "Do not capture the deployed contract id into a shell variable or .env file". The page doesn't say how to get the ID back later if an agent needs it.

Outcome we're after:
The guide doesn't model capturing deploy output, agrees with the CLI's skill, and an agent reading it knows how to get a deployed contract's ID when it needs one. How to get there is up to whoever picks this up.

Reference:

How to check the fix:

  • Following the guide with CLI 28.x on testnet, every step still works.
  • No step captures deploy output into a variable that the guide doesn't use.
  • pnpm validate passes.

Why it matters: Coding agents copy these guides as is. In the HackMeridian 2026 hackathon (147 public repos), deploy scripts captured contract IDs from stdout and copied them into files.

Related: stellar/stellar-cli#2880 (the skill doesn't mention alias show), #2972 (initialization guide, same pattern), #2892 (added this guide).

Activity

  1. stellar-doxie commented on Nov 2, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    I saw this issue. Nobody has called me in yet, so I take no action on it.

    How to reach me:

    • Anyone with write permission can call me in. Comment /triage, add the bot:take label, or assign @kaankacar, @ElliotFriend or @wmendes.
    • The issue author can send me away with /triage stop.
    • People with write permission can also add the bot:hands-off label.
  2. self-assigned this
    on Nov 10, 2026
  3. stellar-doxie commented on Nov 10, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Working this because @kaankacar assigned it.

    I am checking the guide against CLI 28.x now. I will follow up with a PR or a question.

  4. added
    bot:hands-off
    on Nov 10, 2026
  5. stellar-doxie commented on Nov 10, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Standing down because @kaankacar added bot:hands-off. I take no more action here. #3086 stays closed.

    How to reach me:

    • Anyone with write permission can call me back. Comment /triage, add the bot:take label, or assign @kaankacar, @ElliotFriend or @wmendes.
    • The issue author can send me away with /triage stop.
    • People with write permission can also add the bot:hands-off label.
  6. kaankacar commented on Nov 16, 2026

    @kaankacar
    Contributor

    /triage

  7. removed
    bot:hands-off
    on Nov 16, 2026
  8. stellar-doxie commented on Nov 16, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Back on this because @kaankacar asked with /triage and removed bot:hands-off.

    I am checking the guide against stellar-cli 30.0.1, the newest release. The issue cited 28.1.0. I will follow up with a PR or a question.

  9. stellar-doxie commented on Nov 16, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Back on this because @kaankacar asked with /triage.

    Opened #3161. I checked it against stellar-cli 30.0.1 on testnet.

  10. kaankacar commented on Nov 16, 2026

    @kaankacar
    Contributor

    /triage

    Run step 4 of the guide (stellar contract invoke) on testnet. The runner allows the command since stellar/github-triage-bot#110. Then update the "Not verified" note in #3161.

  11. stellar-doxie commented on Nov 16, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Back on this because @kaankacar asked with /triage.

    I ran step 4 on testnet with stellar-cli 30.0.1. It works: stdout is ["Hello","world"], and the read-only notice goes to stderr.

    The run found one more defect in step 4, now fixed in #3161 (e92fb01):

    • The function-list command -- -h had no --source. Without a saved default it exits 2. It now passes --source agent-1.
    • -- -h lists function names only. The page now says -- hello -h shows a function's arguments.

    The "Not verified" note in #3161 now lists only the empty-line claim for functions with no return value. hello cannot test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions