fix(codex): keep collaboration guidance before conversation - #1380
fix(codex): keep collaboration guidance before conversation#1380harryzhou2000 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe Responses collaboration path now detects replayed guidance, preserves developer prefixes, and places generated guidance before conversation content for stateless requests. Stateful continuations reuse or replace guidance without duplication. Tests and documentation cover these rules. ChangesDeveloper guidance injection
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request has been marked Ready for Review. |
|
@harryzhou2000 Please finish your pr. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-site/src/content/docs/guides/sub-agent-surface.md`:
- Around line 54-56: Update the documentation around the array-form stateless
Responses request ordering to explicitly state that generated guidance is
inserted after leading system and developer metadata, before conversational
input. Keep the existing stateful previous_response_id replay-prefix behavior
unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 405d5a07-ed5b-4f39-8780-45e28f90df7a
📒 Files selected for processing (4)
docs-site/src/content/docs/guides/sub-agent-surface.mdsrc/server/responses/collaboration.tstests/multi-agent-compat.test.tstests/responses-state.test.ts
8d5434a to
df7ad09
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
df7ad09 to
7108a85
Compare
|
|
Summary
compaction_triggerordering, with focused regression coverage and documentation.The root cause was tail placement. Stateless HTTP requests have no trusted replay prefix, so OpenCodex generates guidance for each request; appending it after current conversation made stable metadata look like fresh, recency-dominant input.
Current
devseparately suppresses OpenCodex guidance when the host-global catalog observation isstaleorunknown(#1407). This PR applies when guidance is generated and does not reintroduce the removed catalog warning.Verification
bun run typecheckbun scripts/lint-gui-if-changed.tsbun run privacy:scanbun run doctor:gui:if-changed(React Doctor: no issues)bun test tests/multi-agent-compat.test.ts tests/responses-state.test.ts tests/openai-responses-passthrough.test.ts tests/responses-compaction-routing.test.ts(238 pass, 0 fail)ASTRO_TELEMETRY_DISABLED=1 bun run buildindocs-sitegit diff --checkChecklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Documentation