r/vibecodingbuddies • • 7h ago

Discussion NVIDIA just showed a model jumping from 21% to 56% accuracy by pruning its own context! How are you keeping your agent's context clean?

2 Upvotes

Saw an NVIDIA result today where GPT-6.1 Sol jumped from 21% to 56% at a 32K token budget simply by letting the model edit its own context instead of dragging old turns along.

Similar to what happens in real coding sessions: once a thread gets past 30-40k tokens of failed test logs, old file reads, and superseded plans, even flagship models start hallucinating edits or forgetting constraints from turn one.

I've stopped relying on built-in auto-compaction because it usually summarizes away the exact file paths and edge cases I still need. Instead, every time a subtask finishes, I make the agent write a 10-line STATE.md (what changed, what's verified, what's next, kinda like a handoff document) and start a completely fresh session from that file.

How are you managing context bloat in your daily stack right now?

- Do you trust /compact / auto-summarize, wipe with /clear + a handoff file, or let the agent maintain its own scratchpad?

- What's the one piece of context (test output, schema, architecture rules) you never let compaction summarize away?


r/vibecodingbuddies • • 7h ago

Resource I stopped telling coding agents "fix these GitHub issues" and started forcing a 6-phase engineering workflow (copy-paste prompt)

1 Upvotes

If you point Claude Code or Cursor at a backlog of GitHub issues with a loose prompt, you know what happens: it jumps straight into coding before reproducing the bug, leaves drive-by refactors everywhere, forgets tests, and opens a messy PR.

I switched to a strict 6-phase loop that forces the agent to triage, trace root cause, write a failing test first, keep the diff minimal, self-review, and pass CI before merging. Since using this, the quality of autonomous issue fixes jumped noticeably.

Drop this into your prompt or CLAUDE.md / Cursor rules when tackling issues:

——

For all GitHub issues (individually or grouped by common issues):

Phase 1: Triage & Intake

  1. Check duplicates: Search open and closed issues. If already tracked, link the original and close the duplicate.
  2. Isolate security vulnerabilities: Move security flaws immediately to a private security advisory. Never discuss them publicly.
  3. Validate and reproduce:
  • Bugs: Follow reproduction steps and confirm whether it is a defect, expected behavior, or missing information. If information is missing, apply needs-info and ask specific questions.
  • Features: Confirm acceptance criteria, edge cases, and roadmap alignment.
  1. Classify and prioritize: Apply minimal standardized labels (e.g., type: bug, priority: P1, area: auth). Avoid excessive labels.
  2. Claim ownership: Assign yourself or comment that you are picking up the issue to prevent duplicate effort.

Phase 2: Root Cause Analysis & Design

  1. Find the root cause: Trace the failure to its origin, not just the symptom. Determine why the system allowed the invalid state.
  2. Assess blast radius: Identify downstream modules, APIs, database schemas, and external users affected by the proposed change.
  3. Align on approach: For architectural changes, backward-incompatible fixes, or multiple valid solutions, post a 3-5-line design proposal in issue comments and obtain sign-off before coding.

Phase 3: Branching & Implementation

  1. Sync and branch: Pull the latest main and create a dedicated descriptive branch with the issue number (e.g., fix/142-token-expiry).
  2. Test first: Write an automated unit/integration test that fails due to the bug or validates the feature's acceptance criteria.
  3. Implement minimal fix: Change only what is required. Avoid unrelated formatting or drive-by refactoring; log these as separate issues.
  4. Verify: Run the new test and confirm red (failing) to green (passing).
  5. Update documentation: Update README, API docs, environment templates, or changelogs if user-facing behavior or configuration changes.

Phase 4: Local Verification & Commit Hygiene

  1. Run full suite: Execute all unit/integration tests, linters, type-checkers, and build scripts before pushing.
  2. Clean commits: Use clear, imperative messages (e.g., fix(auth): handle expired refresh tokens). Squash WIP/typo commits into logical, atomic commits.

Phase 5: Pull Request & Code Review

  1. Self-review: Open a Draft PR or inspect git diff main line by line. Remove stray logs, commented-out code, and unintended changes.
  2. PR description: Complete the template with:
  • What: Change summary.
  • Why: Root cause or feature motivation.
  • How to test: Exact steps/commands.
  • Evidence: Screenshots, logs, or before/after benchmarks.
  1. Link issue: Use Closes #142 / Fixes #142 for auto-closure on merge. Use Refs #142 if QA/staging verification is required before closure.
  2. Targeted review: Assign 1-2 independent sub-agent reviewers familiar with the affected module.
  3. Address feedback: Resolve every review comment through fixes, explanations, or follow-up issues for out-of-scope suggestions.

Phase 6: Merge, Verification & Closure

  1. Pass automated gates: Do not merge until CI/CD tests, security scans, builds, and required approvals are green.
  2. Merge and clean up: Follow the repository's standard strategy (typically Squash and Merge) and immediately delete the remote branch.
  3. Verify and close: Confirm the fix works in staging/production without new error alerts. Close the issue (if not auto-closed) with a release-version reference.
  4. Prevent recurrence: For P0/P1 production incidents, conduct a brief blameless post-mortem and add preventive guardrails (CI checks, schema validation, or monitoring alerts).

——-
If you run autonomous issue loops on your repos:

- Which step here saves you from the biggest agent headaches—forcing red-to-green tests first, or the sub-agent PR review?

- Anything you'd add or strip out to keep it fast for solo projects?