
ChatGPTからVS CodeのCodexへコピペせずに指示を渡す――MCPで保存し、人間が確認して送信する構成Passing Instructions from ChatGPT to Codex in VS Code Without Copy-Paste: Saving via MCP, Human Review, and Submission
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
- ChatGPTからCodexへの指示連携を、ローカルMCPサーバーへの保存とVS Code拡張による添付で検証。
- 確認と送信は人間が担い、制御を保ちながらコピペを減らしたい開発者に役立ちます。
- ChatGPT-to-Codex handoff uses a local MCP server and VS Code extension, with a human reviewing and sending each request.
- It cuts copy-paste work while preserving control.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).
要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.
コピペを減らす
ブラウザーのChatGPTで固めた指示を、作業中のVS CodeのCodex会話へコピー&ペーストせずに渡す構成が検証された。単に接続できることと、既存会話へ指示を正しく受け渡せることを分けて確認している点が重要だ。
保存と添付
対象はWindows上のVS CodeとCodex、ブラウザー側のWorkである。Workで設計や修正方針を整理し、指示本文をPC内で動く自作のローカルMCPサーバーへ保存する。続いて、自作のVS Code拡張機能が保存ファイルを検証・コピーし、Codexの入力欄へ添付する流れとした。
架空の短い本文を使った検証では、PC内への保存、VS Codeでの添付、人間による送信操作を経て、Codexが内容を読み取るところまで成功した。
人間が担う操作
自動化の対象は、長い指示本文を選択してコピーし、別画面へ貼り付ける操作である。一方、受渡し先となる既存会話の選択、内容の確認、依頼文の入力、送信は人間が担当する。Workで方針を整理した後、人間が内容を確かめてから、Codexへ実装や調査を依頼する役割分担だ。
既存会話には、それまでの調査結果や確定済みの判断が含まれる。このため、新しいタスクを実行できただけでは、作業中の会話に追加指示を渡せたとは判断していない。
Dotでの検証
別経路として試したDotでは、Dot自身が作成した調査タスクの継続には成功した。しかし、人間が作成した既存のVS Code会話はAPIでの読み取り時にエラーとなり、その会話への受渡し成立は確認できなかった。
この検証は環境構築を一から再現する導入手順ではなく、保存・添付・送信を分離し、どの状態を受渡し成功とみなすかを整理したものとなっている。
Without Copy-Paste
The article tests whether instructions prepared in browser-based ChatGPT can be passed to a Codex conversation in VS Code without copying and pasting the instruction text. The aim is to reduce handling of long instructions while keeping selection of the destination conversation, content review, and submission under human control.
The test covers VS Code and Codex on Windows, with Work used as the name for the browser-side function. Work is used to organize design decisions or modification plans before implementation or investigation is requested in Codex.
Saving and Attaching
The handoff separates saving, attachment, and submission. A custom MCP server running on the PC receives the instruction text from Work and saves it locally. A custom VS Code extension then verifies and copies the saved file before attaching it to the Codex input field.
With a short fictional text, the process succeeded through local saving, attachment in VS Code, human submission, and reading by Codex. This demonstrated the handoff in the tested environment without requiring the body of the instructions to be manually selected, copied, and pasted into another screen.
Human Review and Submission
The workflow does not automate every step. A person confirms the target conversation and the instruction contents, enters the request text, and performs the send action. The division of responsibilities therefore leaves the final decision and submission with the user while using the local MCP server and VS Code extension to reduce copy-paste work.
The article focuses on the conditions used to judge a handoff as successful. It is not a setup manual for reproducing the environment from the beginning.
Existing VS Code Conversation
An existing conversation may already contain investigation results and settled decisions. Successfully running a new task does not by itself prove that additional instructions reached the conversation already being used for the work.
A separate route using Dot was also tested. Continuing a task created by Dot succeeded. However, an existing VS Code conversation created by a human produced an error when read through the API, so the test did not confirm a successful handoff into that conversation. The reported product behavior is limited to what was observed in the test environment.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPoko長い指示本文をコピペせず、確認と送信は人がするんだ。これって大きい変化?So the long instructions move without copy-paste, but a person still reviews and sends them. Is that a big change?
- TECHガイドTECH Guideこの検証では、PC内への保存とVS Codeでの添付を経て、Codexが読めました。手間を減らしつつ、人の制御を残す変化です。In this test, Codex read instructions saved locally and attached in VS Code. It reduces manual work while keeping people in control.
- ポコPokoMCPサーバーって、ここでは何をしているの? 指示の中継係みたいなもの?What does the MCP server do here? Is it like a relay for the instructions?
- TECHガイドTECH GuideここではWorkから受け取った指示をPC内に保存する役です。VS Code拡張がそのファイルを確かめ、入力欄へ添付します。Here, it stores instructions received from Work on the PC. The VS Code extension checks that file and attaches it to the input box.
- ポコPokoぼくなら、ブラウザーで固めた方針を作業中の会話へ渡したいな。最後に自分で見て送れるなら安心かも。I’d use it to pass a plan from the browser into my working conversation. Reviewing it myself before sending sounds reassuring.
- TECHガイドTECH Guide確認できたのはWindows上のVS CodeとCodexで、短い架空本文を使った構成です。Dot経由では、人が作った既存会話への受渡しは確認できませんでした。The confirmed setup used VS Code and Codex on Windows with a short fictional text. Through Dot, handoff to an existing human-created conversation wasn’t confirmed.


