Skip to content

Fix project chat code exploration loop and duplicate messages#12

Merged
shuveb merged 1 commit intomainfrom
loop-fix
Mar 9, 2026
Merged

Fix project chat code exploration loop and duplicate messages#12
shuveb merged 1 commit intomainfrom
loop-fix

Conversation

@shuveb
Copy link
Contributor

@shuveb shuveb commented Mar 9, 2026

Summary

  • Block all code exploration requests during exploration follow-ups instead of only blocking exact-match prompts (LLM easily bypassed by varying prompts)
  • Add MAX_EXPLORATION_DEPTH (3) to cap exploration round-trips even for non-follow-up paths, with depth tracked through job payloads
  • Add job idempotency check in worker to skip already SUCCEEDED/FAILED jobs, preventing duplicate messages from Kafka replays on consumer restarts

Test plan

  • Verify project chat code exploration stops after 3 round-trips
  • Verify exploration follow-ups don't trigger additional explorations
  • Verify Kafka message replays for completed jobs are skipped

🤖 Generated with Claude Code

- Block all code exploration requests during exploration follow-ups instead
  of only blocking exact-match prompts (LLM easily bypassed by varying prompts)
- Add MAX_EXPLORATION_DEPTH (3) to cap exploration round-trips even for
  non-follow-up paths, with depth tracked through job payloads
- Add job idempotency check in worker to skip already SUCCEEDED/FAILED jobs,
  preventing duplicate messages from Kafka replays on consumer restarts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shuveb shuveb merged commit ddfe6ec into main Mar 9, 2026
2 checks passed
@shuveb shuveb deleted the loop-fix branch March 9, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant