Local executor ignores cli-config attribution opt-out, forcing Co-authored-by trailer

Where does the bug appear (feature/product)?

Cursor SDK

Describe the Bug

Every commit my SDK-driven agents make carries Co-authored-by: Cursor <[email protected]>, and I cannot turn it off. I already set attribution.attributeCommitsToAgent: false in ~/.cursor/cli-config.json. In the installed dist, computeCachedRequestContext gates the trailer on attributionConfigProvider?.get()?.attribution?.attributeCommitsToAgent ?? true, but createLocalExecutor never populates attributionConfigProvider, so the opt-out is unreachable and commitAttributionMessage defaults to "enabled". The agent then appends --trailer itself. No public option exposes this: AgentOptions, LocalAgentOptions, and CreateLocalExecutorOptions declare no attribution field, and settingSources loads hooks, MCP, rules, and skills but never cli-config.json.

Steps to Reproduce

I set ~/.cursor/cli-config.json to {"attribution":{"attributeCommitsToAgent":false,"attributePRsToAgent":false}}, then ran a local agent via Agent.create({ apiKey, model, local: { cwd, settingSources: ["user","project","plugins"], store } }) and asked it to commit. Across 44 commits in my transcripts, the agent issued git add -A && git commit --trailer "Co-authored-by: Cursor <[email protected]>" -m "..." every single time, and all 23 non-merge commits carry the trailer. No git hooks are installed and core.hooksPath is unset locally and globally, so nothing but the agent’s own flag adds it.

Expected Behavior

I expect the local executor to honor attribution.attributeCommitsToAgent from cli-config.json, or for a documented attribution option on AgentOptions / local executor options to let me disable the commit trailer.

Version Information

@cursor/sdk 1.0.24, Node v20.11.0, Linux 6.12.67-linuxkit (Docker), local executor with settingSources [user, project, plugins]

Hey, thanks for the detailed report. The breakdown with steps and versions helps a lot.

What you’re seeing isn’t intended behavior, and it’s definitely not something in your setup. The opt-out attribution.attributeCommitsToAgent from cli-config.json currently doesn’t reach the local executor in the SDK, so the Co-authored-by trailer can’t be disabled via config. I passed your findings about the SDK surface to the team. I can’t share a timeline yet, but I’ll reply in the thread when there’s an update.

As a workaround until it’s fixed: since --trailer gets added before the commit-msg hook runs, you can add a commit-msg hook that removes the trailer line. For example:

#!/bin/sh
# .git/hooks/commit-msg  (chmod +x)
grep -v '^Co-authored-by: Cursor <[email protected]>$' "$1" > "$1.tmp" && mv "$1.tmp" "$1"

If you want to apply this globally for all repos, put the hook in a separate folder and point to it via core.hooksPath. Let me know if it works for you.

Hey @James_M,

I promised an update, so here it is, even though it’s not the one you want. As of @cursor/sdk 1.0.35, the local executor still doesn’t read attribution.attributeCommitsToAgent from cli-config.json, and there’s still no SDK-level option for it, so the Co-authored-by trailer stays on. I rechecked the published package today.

Your commit-msg hook is still the best option, and you can set it via core.hooksPath if you want it to be global. The issue is tracked internally, but it’s not being actively worked on right now, so I don’t have an ETA. If it does get added, I’ll come back here.