open-swe/agent
ericness 6b005cfb67
fix: include resolved repo in Linear prompt to prevent repo ambiguity (#1307)
The Linear webhook (`process_linear_issue` in `agent/webapp.py`) was the
only trigger whose user prompt did not surface the resolved repo to the
LLM:

- Slack:        `## Default Repository Hint` (line 947)
- GitHub issue: `## Repository: ...`         (`build_github_issue_prompt`, line 1443)
- GitHub PR:    `## Repository: ...`         (`build_github_pr_review_prompt`, line 1526)
- Linear:       (missing)

`configurable["repo"]` was still being set and consumed by
`commit_and_open_pr`, but the agent itself never saw it. For tasks
routed via Linear team/project mapping, the LLM had to guess which
repo to clone — frequently falling back to `langchain-ai/open-swe`
(via `SELF_AWARENESS_SECTION` in `agent/prompt.py`) or
`langchain-ai/langchainplus` (via `default_prompt.md`), silently
targeting the wrong repository.

This is a regression: commit 5e4c6bb8 on branch `yogesh/stop-auto-cloning`
("fix: include resolved repo in Linear prompt to prevent repo ambiguity",
2026-03-16) added this exact line, but it was dropped when that branch
was squash-merged as PR #1159 ("feat: stop auto-cloning and let agent
manage repo setup", 2039fe66, 2026-04-10). Subsequent refactors
(e215f1ef, f662ad65) preserved the gap.

Adding the line back mirrors the GitHub/Slack prompt builders and
matches the rationale of e215f1ef ("Linear team/project mapping handles
per-team routing"): routing is correct, the prompt just wasn't
propagating it.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
2026-06-03 15:08:07 -07:00
..
dashboard feat(dashboard): render Slack/Linear replies as a card in chat (#1399) 2026-06-03 22:05:47 +00:00
integrations feat: add idle TTL and delete-after-stop sandbox lifecycle controls (#1265) 2026-05-08 00:30:14 -04:00
middleware fix: sanitize malformed Anthropic thinking blocks (#1357) 2026-05-28 16:15:13 -07:00
skills feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
tools fix: reviewer publishes against stale head_sha on mid-run re-review (#1393) 2026-06-03 11:38:56 -07:00
utils fix: remove manual review trigger surfaces (#1396) 2026-06-03 12:33:22 -07:00
analyzer.py feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
encryption.py feat: support TOKEN_ENCRYPTION_KEY rotation via MultiFernet [closes AB-2323] (#1275) 2026-05-08 14:29:23 -07:00
prompt.py chore: attribute commit co-author to open-swe[bot], not open-swe user 2026-06-03 11:19:24 -07:00
review_style_collector.py feat: tune reviewer for precision — web/wiki tools + recalibrated prompt (#1312) 2026-05-20 18:35:00 +00:00
review_style_guidance.py feat: tune reviewer for precision — web/wiki tools + recalibrated prompt (#1312) 2026-05-20 18:35:00 +00:00
reviewer.py fix: scope public reviewer tokens (#1389) 2026-06-03 09:25:17 -07:00
reviewer_diff.py feat: Inject PR title and body into reviewer context (#1368) 2026-06-01 21:06:19 +00:00
reviewer_findings.py fix: reviewer publishes against stale head_sha on mid-run re-review (#1393) 2026-06-03 11:38:56 -07:00
reviewer_publish.py fix: dedup empty reviewer summary by PR state, not stale re_review flag (#1391) 2026-06-03 10:30:13 -07:00
reviewer_reconcile.py feat: let reviewer set comment titles (#1356) 2026-05-28 16:04:38 -07:00
server.py chore: attribute commit co-author to open-swe[bot], not open-swe user 2026-06-03 11:19:24 -07:00
webapp.py fix: include resolved repo in Linear prompt to prevent repo ambiguity (#1307) 2026-06-03 15:08:07 -07:00