Skip to content

fix(addie): stop Sage passing demo.example.com as brand_id in C2 demos#4075

Draft
bokelley wants to merge 1 commit intomainfrom
claude/issue-4074-c2-brand-demo-fix
Draft

fix(addie): stop Sage passing demo.example.com as brand_id in C2 demos#4075
bokelley wants to merge 1 commit intomainfrom
claude/issue-4074-c2-brand-demo-fix

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 4, 2026

Closes #4074

During certification module C2 (Brand Protocol), the system prompt unconditionally appended "Use brand domain "demo.example.com" for the account." for all active modules. When C2 was active, Sage interpreted demo.example.com as the brand_id for get_brand_identity, which expects roster IDs like daan_janssen — returning REFERENCE_NOT_FOUND and falling back to spec-only teaching.

Root cause: buildCertificationContext (line 557) appended the buyer-domain hint with no module guard. For brand-track modules, Sage conflated "brand domain" with get_brand_identity's brand_id parameter.

Changes:

  • Remove the unconditional demo.example.com instruction from the top-level sandbox-agent block (line 557)
  • In both start_certification_module and get_certification_module demo-scenario blocks (already gated on lp.demo_scenarios?.length): emit buyer-domain guidance only when acquire_rights/sync_accounts is in the scenario tools; emit brand_id-roster guidance only when get_brand_identity is in the tools
  • De-hardcode the get_products reference in the generic teaching rule (line 510) so non-sales-track modules get correct tool guidance; add "if the module has demo scenarios" guard
  • Replace no more get_products callsno more sandbox tool calls in the mastery fast-track rule for consistency
  • Bump CODE_VERSION2026.05.1 for the buildCertificationContext behavior change

Non-breaking justification: server-side Addie system-prompt change only; no schema, protocol, or wire format touched. Changeset is --empty.

Pre-PR review:

  • code-reviewer: approved — flagged two blockers (missing guard in get_certification_module handler; CODE_VERSION not bumped), both fixed before this PR was opened. One nit (symmetry in .includes vs .some) surfaced in PR body.
  • education-expert: approved — confirmed daan_janssen is the correct C2 canonical example; flagged one blocker (line 510 fires for modules with no demo_scenarios), fixed. IACET-relevant: broken demo constitutes mismatch between stated and delivered instruction.

Nits (not fixed, noted for follow-up):

  • c2_ex3 success criteria don't include a step that calls get_brand_identity with authorized: true to demonstrate the available_fields pattern — minor criterion-coverage gap (separate issue)
  • scenarioTools.includes('get_brand_identity') vs .some(t => t === 'get_brand_identity') — minor style inconsistency, not functional

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_019qaFNRgQ5bht7PNJpgHmiR


Generated by Claude Code

The system prompt unconditionally appended "Use brand domain
demo.example.com for the account" for all active certification
modules. In module C2 (Brand Protocol), Sage interpreted this as
the brand_id for get_brand_identity — which expects roster IDs
like daan_janssen — causing REFERENCE_NOT_FOUND and falling back
to spec-only teaching.

Fix: remove the unconditional instruction. In the per-lesson demo
block (already gated on demo_scenarios), emit buyer-domain guidance
only for acquire_rights/sync_accounts scenarios, and brand_id
guidance only for get_brand_identity scenarios. Apply the same
guard to both the start_certification_module and get_certification_module
render paths. Also de-hardcode "get_products" from the generic
teaching rules so non-sales modules get correct tool guidance.

Bump CODE_VERSION to 2026.05.1 for the buildCertificationContext change.

https://claude.ai/code/session_019qaFNRgQ5bht7PNJpgHmiR
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox brand agent fails to resolve demo.example.com during certification module C2

2 participants