chore(triage-issue): Improve triage prompt for accuracy#19454
chore(triage-issue): Improve triage prompt for accuracy#19454
Conversation
| title = _sanitize_title(data.get("title", "")) | ||
| state = data.get("state", "") | ||
| print(f"#{num} {state} {title}") | ||
| print(f"#{num} {title} {state}") |
There was a problem hiding this comment.
This is just to match the print output of the other function.
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
| Do NOT write to `/tmp/` or any other directory. Only write files (e.g. triage_report.md) inside the workspace (repo root). | ||
| Do NOT use Bash redirection (> file)—it is blocked. | ||
| Do NOT use `python3 -c` or other inline Python in Bash, only the provided scripts are allowed. | ||
| Do NOT attempt to delete (`rm`) temporary files you create. |
There was a problem hiding this comment.
Do we need this in the action? This should be specified in the skill already no?
There was a problem hiding this comment.
I put it here because it's specific to the CI run. Locally, the agent can at least try to do this stuff (as someone can still approve it). But some of it is also mentioned in the skill as well.
# Conflicts: # .claude/skills/triage-issue/SKILL.md # .github/workflows/triage-issue.yml
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| ``` | ||
| 4. If no Linear linkback found or the script fails, fall back to printing to terminal. | ||
| 3. Post it to Linear: `python3 .claude/skills/triage-issue/scripts/post_linear_comment.py "JS-XXXX" "triage_report.md"` | ||
| 4. If no Linear linkback found or the script fails, fall back to adding a GitHub Action Job Summary. |
There was a problem hiding this comment.
CI fallback to Job Summary is unreachable
Low Severity
The Step 8 fallback was changed from "printing to terminal" to "adding a GitHub Action Job Summary." However, the new CI constraints in triage-issue.yml block both writing outside the workspace ($GITHUB_STEP_SUMMARY lives in a runner temp directory) and bash redirection (>> $GITHUB_STEP_SUMMARY). This makes the Job Summary fallback unreachable in CI, potentially wasting agent turns against the --max-turns 20 limit. The previous fallback of "printing to terminal" always worked.
Additional Locations (1)
There was a problem hiding this comment.
The action has the permission to do that and it was already posting a Job Summary


Improve the prompt to challenge the framing of the issue reporter and consider misconfiguration etc.
Also fix some issues where the agent was trying to write where it was not allowed in CI (e.g. writing to
tmp). I added some general prompts directly to the system prompt in the GitHub action (as it's only relevant for CI).Also allows
Bash(npm info *),Bash(npm ls *)to get some general package info.Closes #19455 (added automatically)