openairev 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/agents/codex.js +6 -6
package/package.json
CHANGED
package/src/agents/codex.js
CHANGED
|
@@ -79,14 +79,14 @@ export class CodexAdapter {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// No verdict —
|
|
83
|
-
|
|
82
|
+
// No verdict — report what actually happened
|
|
83
|
+
const cmdCount = lines.filter(l => { try { return JSON.parse(l).type === 'item.completed' && JSON.parse(l).item?.type === 'command_execution'; } catch { return false; } }).length;
|
|
84
|
+
let error = lastError
|
|
85
|
+
? `Codex error: ${lastError}`
|
|
86
|
+
: `Codex exited after ${cmdCount} commands without producing a verdict or turn completion event.`;
|
|
84
87
|
if (lastTurn?.usage) {
|
|
85
88
|
const { input_tokens, output_tokens } = lastTurn.usage;
|
|
86
|
-
error += ` Tokens
|
|
87
|
-
}
|
|
88
|
-
if (lastTurn && !lastError) {
|
|
89
|
-
error += ' Likely exhausted its turn budget exploring files before producing output.';
|
|
89
|
+
error += ` Tokens: ${input_tokens} in / ${output_tokens} out.`;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
return { raw: result.stdout, raw_output: result.stdout, progress, session_id: this.sessionId, error };
|