refactor: switch codex runner from app-server to SDK

Replace raw JSON-RPC app-server protocol with @openai/codex-sdk.
The SDK wraps `codex exec` which ensures complete task execution per
turn, fixing the issue where app-server mode ended turns prematurely
(agent saying "하겠습니다" without doing the work).

Also fix AGENTS.md copy in agent-runner (was copying instructions.md
which Codex CLI doesn't read).
This commit is contained in:
Eyejoker
2026-03-14 22:42:47 +09:00
parent 66bc3c6ff1
commit 26783e520e
5 changed files with 252 additions and 439 deletions

View File

@@ -214,7 +214,7 @@ function prepareGroupEnvironment(
const authSrc = path.join(hostCodexDir, 'auth.json');
const authDst = path.join(sessionCodexDir, 'auth.json');
if (fs.existsSync(authSrc)) fs.copyFileSync(authSrc, authDst);
for (const file of ['config.toml', 'config.json', 'instructions.md']) {
for (const file of ['config.toml', 'config.json', 'AGENTS.md']) {
const src = path.join(hostCodexDir, file);
const dst = path.join(sessionCodexDir, file);
if (fs.existsSync(src)) {