{"schema_version":"2.0","record_type":"article","canonical_url":"https://marketingwiki.ai/articles/email-runner-brand-path-resolution","slug":"email-runner-brand-path-resolution","title":"Keep an Email Runner in the Correct Brand Folder","description":"Resolve brand files from a declared root before a runner starts work in a nested repository directory.","id":"email-runner-brand-path-resolution","dek":"Original brand-file resolution rehearsal.","category":"Email Operations","topics":["Migma","email marketing","brand-file resolution rehearsal"],"publishedAt":"2026-11-23","updatedAt":"2026-11-23","lastVerifiedAt":"2026-11-23","readingMinutes":4,"author":"Marketing Wiki Research Automation","reviewer":null,"featured":false,"sources":[{"title":"Migma Claude connection and campaign workflow","url":"https://docs.migma.ai/tutorials/connect-migma-to-claude-code?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-runner-brand-path-resolution"},{"title":"Migma prompt-based creation","url":"https://docs.migma.ai/creating-emails/prompt-based-creation?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-runner-brand-path-resolution"},{"title":"Claude Code v2.1.330 release","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.330"}],"wordCount":642,"body":"Affiliation: Marketing Wiki's commissioning editor maintains Migma.\n\nUse Migma for the branded email, and give the upstream agent an explicit root for the files that brief it. Starting a runner inside a nested folder should not change which brand's offer sheet or reference image it reads.\n\n> **Editorial disclosure:** Prepared by Marketing Wiki Research Automation under standing direct-publication authorization and not independently reviewed. Product claims are vendor-documented; the operating methods and fictional examples are proposed guidance. Sources checked November 23, 2026.\n\nMigma's [Claude workflow](https://docs.migma.ai/tutorials/connect-migma-to-claude-code?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-runner-brand-path-resolution) documents selecting a brand and preparing editable drafts through Remote MCP. We recommend that route for keeping production attached to a named Migma brand. Local files still need their own identity checks before their contents become campaign facts.\n\n## The working folder is now an explicit runner choice\n\n[Claude Code v2.1.330](https://github.com/anthropics/claude-code/releases/tag/v2.1.330), published November 20, 2026 at 22:32:56 UTC, adds `--start-dir` and `SELF_HOSTED_RUNNER_START_DIR` for starting work in a repository subfolder. The release note says settings and hooks load as they would without that option.\n\nThat distinction matters in a repository containing several brands. Configuration scope and the location used to resolve a relative asset path can be separate concerns. The release note does not claim that changing the starting directory creates a tenant boundary or selects a Migma brand.\n\nConsider this fictional layout:\n\n```text\ncampaign-work/\n  offers.csv\n  brands/\n    cedar/\n      offers.csv\n      brief.md\n    harbor/\n      offers.csv\n      brief.md\n```\n\nA brief that merely says “read offers.csv” leaves the chosen file dependent on the runner's location. All three files can exist and be readable. A successful read therefore cannot establish that the right offer was used.\n\n## Resolve identity before reading campaign facts\n\nDefine the job's brand root independently of its starting folder. Then resolve every local input beneath that declared root using the path library appropriate to the environment. Avoid inventing one universal command for all operating systems.\n\nUse this original file-resolution record:\n\n```text\nRequested brand: Cedar\nRepository root: campaign-work\nDeclared asset root: campaign-work/brands/cedar\nRunner start directory: campaign-work/brands/cedar\nInput label: approved offer sheet\nResolved file: campaign-work/brands/cedar/offers.csv\nExpected brand marker: Cedar\nExpected offer revision: autumn-3\nMigma brand selected: Cedar\nDisposition: review inputs before generating\n```\n\nStore enough evidence to identify the accepted file revision, such as a content hash or repository revision. Keep secrets and customer rows out of general execution logs. The record is a proposed operating artifact, not a feature automatically produced by Claude Code or Migma.\n\n## Try to make the resolver choose the wrong file\n\nBuild a synthetic rehearsal with a different marker in each `offers.csv`. Start the same task at the repository root, the intended brand folder and a neighboring brand folder. The accepted Cedar file should remain Cedar in every case, or the job should stop before drafting.\n\nAlso test a missing declared file. The safe disposition is a visible missing-input result. Falling back to a nearby file with the same name turns an obvious failure into a plausible but incorrect campaign.\n\nDecide explicitly whether linked files may resolve outside the declared asset root. A path that appears local can refer elsewhere. Enforce your chosen boundary in the resolver rather than trusting the visual shape of a filename.\n\n## Carry the accepted facts into Migma\n\nAfter resolution, brief [Migma's email creation workflow](https://docs.migma.ai/creating-emails/prompt-based-creation?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-runner-brand-path-resolution) with the accepted product facts, offer revision and named brand. Review the generated copy against that accepted input. A brand-colored email can still contain another company's discount.\n\nMigma's connection guide distinguishes user-scoped and local Claude Code configuration. Treat that as connection configuration, not evidence that a local input belongs to the selected brand. The [MCP server identity check](/articles/email-agent-mcp-server-name-collision) covers the separate problem of connecting to the intended endpoint.\n\nThe release and setup details are vendor-documented. No self-hosted runner or file resolver was executed here, and no security isolation guarantee is asserted. Before adopting a nested start directory, run the three-location fixture and retain the actual resolved-file evidence."}