You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/agent/src/server/agent-server.ts
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1605,6 +1605,19 @@ ${attributionInstructions}
1605
1605
}
1606
1606
1607
1607
if(!this.config.repositoryPath){
1608
+
constpublishInstructions=
1609
+
this.config.createPr===false
1610
+
? `
1611
+
When the user asks for code changes:
1612
+
- You may clone a repository and make local edits in that clone
1613
+
- Do NOT create branches, commits, push changes, or open pull requests in this run`
1614
+
: `
1615
+
When the user explicitly asks to clone or work in a GitHub repository:
1616
+
- Clone the repository into /tmp/workspace/repos/<owner>/<repo> using \`gh repo clone <owner>/<repo> /tmp/workspace/repos/<owner>/<repo>\`
1617
+
- Work from inside that cloned repository for follow-up code changes
1618
+
- If the user explicitly asks you to open or update a pull request, create a branch, commit the requested changes, push it, and open a draft pull request from inside the clone
1619
+
- Do NOT create branches, commits, push changes, or open pull requests unless the user explicitly asks for that`;
1620
+
1608
1621
return`
1609
1622
# Cloud Task Execution — No Repository Mode
1610
1623
@@ -1617,11 +1630,12 @@ When the user asks about analytics, data, metrics, events, funnels, dashboards,
1617
1630
1618
1631
When the user asks for code changes or software engineering tasks:
1619
1632
- Let them know you can help but don't have a repository connected for this session
1620
-
- Offer to write code snippets, scripts, or provide guidance
1633
+
- If they have not specified a repository to clone, offer to write code snippets, scripts, or provide guidance
1634
+
${publishInstructions}
1621
1635
1622
1636
Important:
1623
-
- Do NOT create branches, commits, or pull requests in this mode.
1624
1637
- Prefer using MCP tools to answer questions with real data over giving generic advice.
0 commit comments