fix(codex): bound parent subagent previews - #4150
Conversation
a3f53f5 to
1851e48
Compare
|
| Filename | Overview |
|---|---|
| packages/server/src/server/agent/providers/codex-app-server-agent.ts | Adds UTF-8-safe truncation and bounded parent-preview projection while preserving separate canonical child events. |
| packages/server/src/server/agent/providers/codex-app-server-agent.test.ts | Adds broad regression coverage for bounded previews, with two new test bodies using prohibited inline conditionals. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
C[Canonical child timeline] --> P[Select latest 200 activities]
P --> I[Bound each activity to 4 KiB]
I --> L[Curate parent log]
L --> B[Bound parent log to 32 KiB]
B --> R[Emit root parent snapshot]
C --> S[Emit full provider-subagent activity]
Reviews (1): Last reviewed commit: "fix(codex): bound parent subagent previe..." | Re-trigger Greptile
|
|
||
| test("bounds the root sub-agent prompt in the complete emitted snapshot", () => { | ||
| const session = createSession(); |
There was a problem hiding this comment.
These inline if guards mix assertion mechanics with branching and repeat the repository-prohibited conditional test-body pattern. Move snapshot narrowing into a helper or use deterministic assertions so failures remain direct.
Rule Used: # Code Review Pattern Reference: Slop, Tests, Feat... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Refs #2300
This removes the quadratic parent-copy path for Codex provider subagents.
Regression coverage exercises large, nested, and multibyte child histories.