← Back to PRs

#3587: fix(message): disable cross-context marker by default (#1782)

by nadesh00 open 2026-01-28 21:45 View on GitHub →
## Summary - Disable `[from #...]` prefix on cross-context messages by default - Users who want the origin marker can set `tools.message.crossContext.marker.enabled: true` - Updated docs and config schema to reflect new default ## Test plan - [x] `pnpm lint` passes - [x] `pnpm build` passes - [x] `pnpm test` passes (4590/4590) - [x] Updated test to explicitly enable marker when testing embed behavior Rebased on latest main and resolved CHANGELOG.md conflict. Ready for review. Closes #1782 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR changes cross-context message decoration so the visible origin marker (e.g., `[from …]`) is **disabled by default**, and must be explicitly enabled via `tools.message.crossContext.marker.enabled: true`. It updates the outbound decoration logic (`src/infra/outbound/outbound-policy.ts`) accordingly, adjusts the relevant test to opt in to the marker (`src/infra/outbound/outbound-policy.test.ts`), and updates config UI/schema help text plus the changelog to document the new default. The change is localized to the outbound message pipeline: `message-action-runner.ts` calls `buildCrossContextDecoration`, which now returns `null` unless the marker is explicitly enabled, preventing the prefix/suffix or embeds from being applied on cross-context sends unless opted in. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - The change is narrowly scoped to the cross-context decoration gate, flips the default as intended, and updates the associated test and config help text. No other call sites rely on the old default, and decoration is already optional (null-safe) in the outbound pipeline. - No files require special attention <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs