Codex CLI에서 osFoundry 에이전트 세션으로 작업을 넘기는 방법
다 끝나면 Codex CLI는 자기가 직접 하면 안 되는 일을 osFoundry 의 세션(에이전트, 팀, 루프 중 하나)에 넘길 수 있게 된다. 넘기는 건 세 가지다. 목표, 지금까지 파악한 내용의 요약, 돌려받고 싶은 결과물. 세션 오너한테 알림이 가고, 오너는 Accept and run이나 Decline을 누른다. run이 끝나면 Codex는 같은 터미널 세션에서 결과를 읽고 하던 일을 이어 간다. Runner 자리를 줘 두면 클릭 없이 상한이 걸린 run을 직접 띄울 수도 있다. 누가 뭘 하나 Codex CLI osFoundry 로그인 내 Codex 로그인 그대로. osFoundry OAuth 토큰도 Codex가 들고 있다 워크스페이스 하나와 체크한 스코프에 대해 연결을 한 번 승인 닿는 범위…
Codex CLI is now able to hand over tasks to osFoundry's session agents - teams, loops or single agents. There are three ways to hand over a task: a target, a summary of the identified work so far, and the desired outcome. The session owner receives a notification, and then accepts or declines the request. Once the task is complete, Codex reads the results in the same terminal session and continues with its work.
If a runner is left in place, Codex can directly launch a paused run without clicking. Codex logs in with the same credentials as osFoundry, including its OAuth token. Only sessions linked to a workspace and the approved scopes are connected. The *_session_* tool handles seven different functions - assigning roles, sending handoffs, reading session state, reading task results, posting notes, proposing handoffs, and requesting run sessions.
Users are either viewers (reading only), contributors (notes and handoff suggestions), or runners (requesting runs). Codex checks local storage before running a task and confirms writes with the owner. Handoffs wait for the owner's Accept and run command. The Runner's role is determined by a request for a session run, with a maximum of 1 to 10 rounds of runtime for the owner to approve. The outcome is connected to the task's state and results, with no data leaking outside the session.
1. Connecting to osFoundry: Click the key icon in the osFoundry header, select the Connected agents tab, and add the assistant. Name it (e.g., Codex CLI) for easy identification.
2. Configuring Codex to connect to the server: Run `codex mcp add osfoundry --url https://api.osfoundry.io/api/v1/external-mcp` and edit the `~/.codex/config.toml` file to include the necessary scopes (`osfoundry:read`, `osfoundry:write`, `osfoundry:run`) and default tools approval mode (`writes`).
3. Logging in: Open the osFoundry Connect an agent page in a browser, select the requested capabilities, choose "Codex CLI" as the workspace, enable "Use pending," and accept the connection.
4. Adding the session to a project: Return to the Connected tab, select a project, and click "Add to project." The project will now show the target session(s).
5. Assigning a role to the session: Choose a role (Contributor, Runner) in the "Agent, Team, and Loop sessions" section, save the role, and Codex CLI will be added to the session as the assigned role.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.