CoAgent8 - Source API
    Preparing search index...

    Function createCodexAppSession

    • Creates the stdin session and stdout line handler for one Codex app-server turn.

      Parameters

      Returns {
          line: (raw: string) => void;
          resolvedModel: () => string | undefined;
          session: StdinSession;
      }

      session for runCommand and line for its onStdoutLine.

      From line: SANDBOX_UNAVAILABLE when the server does not confirm read-only mode, SESSION_INVALID for an unknown thread, PROTOCOL_ERROR on malformed messages, and typed provider errors for failed requests.