{"slug": "driving-pi-with-computer-using-chatgpt-sessions", "title": "Driving pi with computer using ChatGPT sessions", "summary": "A writer documented a workflow that uses ChatGPT tasks as top-level folders to organize persistent Pi agent sessions connected to internal tools through the Pi MCP Adapter version 2.32.1, with one ChatGPT task coordinating the init() series and ten separate writing sessions each bound to a single Blog Bot draft. Pi, an extensible agent harness from earendil-works with interactive, print/JSON, RPC and TypeScript SDK modes, holds the writing context and tool results while the coordinating ChatGPT model, Astra, manages the task layer, and the adapter discovers MCP tools on demand to keep a large tool catalog out of the initial prompt. The author installs the adapter via 'pi install npm:pi-mcp-adapter', registers servers in .mcp.json, and authenticates OAuth servers with '/mcp-auth blogbot', passing draft IDs and source paths through task handoffs rather than credentials.", "body_md": "# Driving pi with computer using ChatGPT sessions\n\nHow I use ChatGPT tasks to organize persistent Pi sessions, connect MCP tools, bridge gaps with computer use, and deliver work without losing context.\n\nFor the init() recaps, I used ChatGPT tasks as folders for the work: one task to coordinate the series, then one per article where I could give feedback. Under each article task was a persistent Pi session connected to our Blog Bot through MCP. Astra coordinated the work from ChatGPT while Pi held the writing context, tools, and exact draft identity underneath it.\n\nI like this setup because the top level feels familiar. It is roughly the same organization I get from named terminal tabs, except a new task can use my existing tooling to start or resume the session that owns the work. The initial task coordinated sources and drafting; the separate article tasks came later for editing. One active writer owned each article.\n\n## The hierarchy I actually use\n\nA ChatGPT task is one concern or bucket of work. It might coordinate a series, own one article, or track an integration repair. I do not treat it as a security boundary or proof that the work is finished.\n\nPi sits below that task layer. [Pi](https://github.com/earendil-works/pi) is an extensible agent harness with interactive, print/JSON, RPC, and TypeScript SDK modes. Its sessions retain the conversation and tool results, while extensions and skills let me reuse capabilities across projects.\n\nAstra and Pi do different jobs here. Astra is the model coordinating my ChatGPT task. Pi is the persistent harness doing the assigned work. Pi can use a different model and provider from Astra. More important, my connectors, shared instructions, model routing, and custom business tools remain available independently of the outer task UI. I can also open the Pi session directly.\n\nFor the init() series, the coordinator collected transcript captures, article briefs, attribution corrections, a source registry, and per-article facts. It kept the planned agenda separate from what the transcripts supported. The ten writing sessions each pointed to one Blog Bot draft, and the later editing tasks resumed those exact sessions instead of starting over.\n\n## Connect Pi to your tools\n\nRecent upstream Pi versions include MCP support. My installed workflow uses version 2.32.1 of the [Pi MCP Adapter](https://github.com/nicobailon/pi-mcp-adapter), so that is the setup I will show here. The adapter discovers tools on demand, which keeps a large tool catalog out of the initial prompt.\n\nInstall the adapter, then restart Pi:\n\n```\npi install npm:pi-mcp-adapter\n```\n\nAdd your server to the project's `.mcp.json`, or merge it into the shared MCP configuration you already use:\n\n```\n{\n  \"mcpServers\": {\n    \"blogbot\": {\n      \"url\": \"https://mcp.example.com/blog\",\n      \"auth\": \"oauth\"\n    }\n  }\n}\n```\n\nThat endpoint is illustrative and will not work as written. Blog Bot is an internal WorkOS service, not a public product readers can sign up for. Substitute the MCP server for your CMS, issue tracker, or other destination. The adapter documents installation, `.mcp.json` discovery, and OAuth authentication.\n\nFor an OAuth server, authenticate and then perform a read-only identity or tool-discovery check before giving the session a writing assignment:\n\n```\n/mcp-auth blogbot\n```\n\nThe login belongs to the Pi environment. I pass draft IDs and source paths through task handoffs, never credentials.\n\nI keep connector setup separate from the task brief. The MCP configuration answers how Pi reaches the service and authenticates. The brief says what this session may do, which sources it should use, and where it must stop. That lets a new article task reuse a working connector without copying setup details or secrets into every prompt. [MCP supplies the external tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp); the invoking environment still decides which calls require approval.\n\n## Start one bounded Pi session\n\nAfter Pi is installed and logged in to the provider I want, I create a named session in the project directory. The current Pi documentation is at [pi.dev](https://pi.dev).\n\n```\ncd /path/to/project\npi --session-dir /path/to/pi-sessions/article-05 \\\n  --name \"article-05-writer\" \\\n  @briefs/article-05.md \\\n  \"Draft the assigned article, save it through the CMS tool, and stop before staging.\"\n```\n\nPi creates a session filename containing a timestamp and ID. Retain the exact path it produced. A later edit should resume that file rather than continue whichever session happened to run last:\n\n```\npi --session /path/to/pi-sessions/article-05/2026-10-09T12-00-00-000Z_SESSION-ID.jsonl\n```\n\nA programmatic parent can run the same assignment in print mode:\n\n```\npi --print --mode json \\\n  --session-dir /path/to/pi-sessions/article-05 \\\n  --name \"article-05-writer\" \\\n  @briefs/article-05.md \\\n  \"Create the draft and return its saved identity.\"\n```\n\nJSON mode emits session, message, and tool events, so the caller must parse a stream rather than expect one ready-made result object. RPC is available when a parent application needs a live conversation. These paths assume the outer session has terminal tools. If it only has access to a terminal UI, computer use can operate that UI instead. Not every ChatGPT mode or account exposes terminal or computer tools, so this tutorial assumes they are enabled.\n\nI configure Pi's provider and model separately. Those do not need to match Astra. For the recap project, some writer sessions used our `cloudflare-ai-gateway/claude-opus-5-5` route with `xhigh` thinking. That is one concrete configuration from this job, not required setup.\n\n## Give the outer task a useful prompt\n\nThe outer task needs an outcome, selected sources, and exact durable identities. It does not need every raw company document. Here is a compact prompt to adapt:\n\n```\nStart or resume the named Pi session for this article. Give it the selected brief\nand source files plus the exact existing CMS draft key. It must read the live draft\nand version before editing, preserve newer human changes, save through the CMS tool,\nread the result back, run the editorial checks, and return the draft URL plus one next\naction. Use the signed-in UI only when a required operation is unavailable through the\ntool. Stop before staging or publication so I can review the first run.\n```\n\nMy handoff also records the exact Pi session file, current artifact version, owner, and completion criteria. A compact machine-readable record might look like this:\n\n```\n{\n  \"task\": \"edit-article-05\",\n  \"piSession\": \"/path/to/pi-sessions/article-05/2026-10-09T12-00-00-000Z_SESSION-ID.jsonl\",\n  \"sources\": [\"briefs/article-05.md\", \"sources/registry.json\"],\n  \"artifact\": {\n    \"system\": \"cms\",\n    \"key\": \"draft:example-05\",\n    \"version\": 7\n  },\n  \"next\": \"read the live draft before editing\"\n}\n```\n\nThose values are illustrative. The important part is retaining both session and artifact identity. If another editor changes the draft, the writer fetches the new version and reapplies its edit. If a write times out, it reads the destination to determine whether the original action committed before trying anything else.\n\n## Make the save verifiable\n\nFor Blog Bot, the writer first discovers the live tool schema and reads the editorial rules. It creates one draft with a stable request ID, or reads the current version before changing an existing draft. The save includes the article body, CMS metadata, and a source-backed fact ledger.\n\nThen it reads the saved object back and runs the same content checks used later in the publication workflow. The handoff records the draft key, editor URL, version, and next action. My local workbench can submit creation and versioned-edit arguments from a JSON file, retain the receipts, and perform that readback. Staging and publishing remain separate operations.\n\nThis is deliberate. A successful mutation response only tells me that the service accepted a request. It does not tell me that the final destination contains the intended body, byline, links, or images. After a consequential edit I inspect the saved object. After publication I inspect the public page.\n\n## Choose the shortest capable path\n\nI use a direct tool call for a small structured operation such as fetching one draft or changing one known field. If the parent already knows the tool, object, and desired change, another agent loop usually adds delay without improving the result.\n\nI use Pi when the work spans sources and revisions, because the persistent session retains decisions, previous checks, and user feedback. It earns its keep when a later edit depends on why an earlier sentence changed, which source boundaries still apply, or which version the writer last inspected. Independent work gets its own session and checkout rather than being folded into an unrelated writer.\n\nComputer use covers the remaining gap. OpenAI describes [computer use](https://developers.openai.com/api/docs/guides/tools-computer-use) as a way for a model to operate browser and desktop interfaces through a harness. In practice, I reach for it when a connector is missing, broken, or unable to express a required UI operation. The UI session uses the permissions of the signed-in account, so I keep the intended account and scope consistent when moving between tool and UI.\n\nMy blunt prediction is that if you do not build an API, people will have a computer-using model operate your UI. A missing API does not keep agents out. It changes the interface they use and usually makes the work slower and harder to verify.\n\n## The image import that forced the fallback\n\nThe [published init() 2026 recap](https://workos.com/blog/init-2026-recap) gave me a concrete example. Blog Bot tried to import an obsolete default cover URL. The origin returned an XML access-denied response, Webflow rejected the image, and the bot retained an unresolved dispatch guard.\n\nI had Astra use the existing authenticated Webflow UI to inspect the CMS item, insert the approved photos and screenshots, set a working cover, save, and reload. Once I approved publication, the session published through that UI. Four article images loaded, and the social metadata referenced the approved venue photo.\n\nDelivering the article and repairing the integration were separate jobs. A dedicated Pi session investigated the bug in an isolated checkout, removed the dead fallback reference, and improved rejection and unknown-outcome handling. It produced a draft pull request with passing local tests and a build, but the fix was not deployed at handoff.\n\nThat distinction is useful beyond publishing. A successful tool response does not prove that the destination is correct, and a completed UI fallback does not prove the connector is repaired. After a consequential edit, I read the saved object and inspect the destination. Unknown writes get reconciled before retrying.\n\n## Account for the waiting\n\nAstra can be quite slow. The delay compounds when a parent asks a Pi session to act, Pi calls a remote tool, the parent checks the result, and a UI fallback adds another round trip. Actual elapsed time and my supervision burden are different costs. A longer unattended run may demand less attention than a faster loop that repeatedly stops for input.\n\nI reduce the serial work by giving Pi a larger bounded assignment: read the selected sources, draft, save, read back, run checks, and stop at a review boundary. That is coarse enough to produce something reviewable without asking the parent to shuttle every paragraph between systems.\n\nIndependent reads can run separately, while simple lookups stay direct. I also avoid nesting Pi underneath the parent for operations the parent can safely perform in one tool call. Persistent sessions do not make the model faster, but they keep me from rebuilding the working set for every edit.\n\nThis post followed the same pattern it describes. A dedicated Pi session drafted and saved it through Blog Bot, while the outer task reviewed the writing and prepared the images.\n\nThe durable handoff is the part I care about most. Keep the exact Pi session path and the exact saved artifact key and version together. Then the next task can resume the work without guessing which conversation knew the context or which object it is about to change.", "url": "https://wpnews.pro/news/driving-pi-with-computer-using-chatgpt-sessions", "canonical_source": "https://workos.com/blog/chatgpt-pi-agent-workflow", "published_at": "2026-10-09 06:30:00+00:00", "updated_at": "2026-10-09 06:48:26.989365+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["ChatGPT", "Pi", "Pi MCP Adapter", "Astra", "Blog Bot", "earendil-works", "nicobailon", "WorkOS"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/driving-pi-with-computer-using-chatgpt-sessions", "markdown": "https://wpnews.pro/news/driving-pi-with-computer-using-chatgpt-sessions.md", "text": "https://wpnews.pro/news/driving-pi-with-computer-using-chatgpt-sessions.txt", "jsonld": "https://wpnews.pro/news/driving-pi-with-computer-using-chatgpt-sessions.jsonld"}}