Skip to main content

ChatGPT Agent Local Files: Work, Codex, and Claude Code Access

A local path alone grants no access. Upload a selected document, use Work with approved local computer access, or open the checkout in local Codex or Claude Code. Then verify the actual file version and permitted actions.

LaoZhang AI TeamPublishedUpdated 16 min read
On this page
Conceptual map of uploads, approved local Work access, local coding checkouts and cloud files, with host, version and permission checks

To give ChatGPT access to a local file, start with the task: attach a document for analysis, use approved local computer access in ChatGPT Work for a live local task, or open your checkout in local Codex or Claude Code for code changes and tests. Typing a folder path into a chat does not connect that folder. A terminal is useful only if it runs on the computer that holds the file.

There is also a product change behind older “ChatGPT Agent local files” advice. As checked on October 7, 2026, the current ChatGPT agent overview says agent is no longer available and directs multi-step tasks to ChatGPT Work. The page still contains older setup text below that notice. Use the current Work documentation to choose where a new task runs.

Work can now use approved resources on a connected computer, including local steps coordinated from the cloud. That makes “ChatGPT always runs remotely, so it can never reach local files” an outdated blanket answer. Access still depends on the task's execution mode, supported client, workspace permissions, and the particular tool.

Choose by the file you actually need

What you needStart hereWhat to check before relying on the answer
Summarize a PDF, compare two documents, or analyze a CSVAttach the selected files; use Library to reuse saved filesThe correct attachments and the correct versions are present
Work on a live local document or approved applicationLocal Work, or eligible Work Cloud with local computer accessThe connected computer is online and the task has local access
Read a repository already on GitHubAuthorize that repository through the ChatGPT GitHub appThe answer cites the intended repository and current remote content
Edit code, run tests, or inspect unpushed changesOpen the actual checkout in local Codex or Claude CodeThe working directory, file contents, diff, and execution permissions match the task
Run code work while your laptop is offCodex Cloud or a suitable Claude Code cloud sessionThe required repository and dependencies exist in that environment
Reproduce a problem involving sensitive filesMake a small, scrubbed copy in a separate workspaceThe copy still reproduces the problem and contains no unrelated data

These choices follow the documented file attachment, Work local access, GitHub app, Codex Cloud, and Claude Code capabilities. They are choices about the input and execution location, not a ranking of model quality.

For example, if sales.csv is the whole task, attaching it is enough. If the task is to fix a script that reads sales.csv, depends on a local package, and has uncommitted changes, opening the current project locally gives the agent the relevant working state. Connecting GitHub would supply a different version of that project.

Upload a document, then verify the supplied copy

For a one-off file question, attach a supported file to the conversation and describe the result you want. Avoid uploading an entire folder when one report or a short log extract would answer the question.

A useful first request is:

Use the attached quarterly-sales.csv.
First identify its column names and date range.
Then calculate revenue by region, explaining any missing rows.
Do not use a similarly named file from an earlier conversation.

The column names and date range are a quick check that the answer concerns the intended file. For a PDF, ask for a distinctive section heading or a short passage and its location before a long analysis. A filename alone is weak evidence: two files can share a name while containing different data.

An upload supplies content to the conversation. It does not create a live mount of the original directory. If you edit the file on your computer afterward, provide the updated copy when that change matters.

Upload a selected CSV copy, verify its columns and date range, and supply an updated copy after changing the original.

When Library is available, you can reuse eligible saved uploads or generated files through Add from library in the composer. Select the relevant file for the current task; do not assume a new conversation or background task inherited everything you previously uploaded. Library availability and file limits depend on the product and account.

A connected provider file has a different relationship to its source. It can remain connected to that provider rather than becoming the same kind of uploaded byte copy. Check the selected source and its permissions. Also, deleting a conversation does not delete a file separately saved in Library; manage the saved file when that is what you intend to remove.

Give ChatGPT Work a live local task

Local Work can use approved files and applications through the supported desktop app. With Local computer access with Work Cloud, cloud coordination can call on an online, connected computer for steps requiring its resources. This is a supported product path worth checking before considering a custom file bridge. OpenAI's Work overview describes both execution arrangements.

For a local document task:

  1. Confirm that your desktop client and workspace support the intended local capability. In a managed workspace, the owner controls Allow local computer access under Work Cloud; users cannot override an administrator's restriction.
  2. If local access with Work Cloud was just enabled, update to the latest supported desktop app and start a new task. Existing tasks, including those in projects, retain their original mode.
  3. Keep the computer holding the file online and connected. Make only the needed file, folder, or application available under the applicable permissions.
  4. Ask Work to read a harmless, distinctive detail from that exact source before asking it to modify anything. Specify whether the task should read a file directly or inspect an approved application.
  5. For edits, request a separate output or a reviewable change, then check the saved result in the intended location.

Those prerequisites come from Work local security. They do not establish that every account has the same settings menu or local capability.

Consider a fictional workbook called forecast-review.xlsx. A first request could name the worksheet and ask Work to report its period heading and row count. If those details match your current workbook, you have evidence that the selected source was read. That does not yet prove write access or permission to send the workbook elsewhere; those are separate actions.

If the computer becomes unavailable before a new turn, an eligible Work task can continue in a cloud container. That container cannot access the unavailable computer's files or tools. A task cannot switch from local execution to cloud execution during a turn. Ask for a cloud-only step using already supplied content, or reconnect the required computer before continuing the local work. Cloud execution also does not automatically inherit local execution restrictions. Work execution rules explain this distinction.

Direct files and an approved app use different authority

Direct file reads, edits, and shell commands follow the task's sandbox and approval settings. Computer Use reaches content through an approved native application under that application's permissions. A direct-file denial does not establish that the same file is inaccessible through an app that can open it. Conversely, allowing the app does not grant administrator rights or permission to approve operating-system security prompts. Work's file and device controls cover this separation.

Use an application when its visible state is necessary—for example, a workbook calculation or GUI-only workflow. For ordinary code and text files, direct file tools give a clearer path and diff. The Codex Computer Use setup guide is the next step when the problem requires operating a Mac or Windows application.

Browser access needs the same care. An approved local browser may use an existing signed-in account; a cloud browser does not automatically inherit that session. Browser Use policies and Computer Use operating a native browser are also different controls. A connected app or MCP server has its own connection and account permissions. Do not treat a shell sandbox as the complete policy for all these tools.

Read a GitHub repository without confusing it with your checkout

The ChatGPT GitHub app reads permitted repository content on demand for analysis, search, and citations. It does not edit or push code or create pull requests. Use Codex when the job requires code changes.

To make a repository question work:

  1. Connect the GitHub account and authorize the specific repository. Organization approval may be a separate requirement.
  2. Name the repository and a relevant file, then ask a concrete question about that code.
  3. Inspect the cited source. Check that it belongs to the intended repository and reflects the remote content you need.

If the repo is missing, check account authorization, app installation, selected repository access, and organization policy separately. The ChatGPT GitHub app has no synced repository index, and newly available content can take time to become searchable. Increasing local filesystem permissions will not repair a GitHub authorization or search problem.

The remote repository cannot reveal a change you have only made in your laptop checkout. If the question depends on unpushed code, stay with that local checkout or deliberately transfer a suitable copy. Also save unsaved editor buffers: a local file tool reads the file on disk, which may differ from the text still visible in the editor.

Open the current checkout in Codex or Claude Code

Local Codex and local Claude Code are suitable when the job needs source files, a current diff, project commands, or local test output. Select the project folder in the app or IDE, or start the CLI from the intended project directory. Then begin with a small inspection request:

Work in this project's current checkout.
Report the working directory, identify the package or build file,
and summarize existing uncommitted changes without editing them.
Do not read environment files or print credentials.
After that, propose the smallest change for the reported bug.

That request makes the expected working state explicit. Its privacy instructions are useful guidance, but they are not an enforced read restriction. Configure the actual permissions where confidentiality requires enforcement.

Before approving a fix, compare the reported directory and diff with your own checkout. After the edit, inspect the changed files and test output in that same environment. A successful test in a cloud workspace or another worktree does not establish that your laptop's current files changed.

Codex workspace-write and approval settings answer different questions

In the older Codex configuration system, sandbox_mode selects read-only, workspace-write, or danger-full-access. workspace-write permits workspace edits and routine commands within its boundary; it is not a promise that every file outside the project is unreadable. approval_policy separately determines when interactive approval is required. In particular, never removes approval prompts without itself removing the sandbox. Full access removes the sandbox restrictions and combines that with no interactive approvals. Current sandbox documentation describes these settings.

The available permissions control differs by client. The CLI's /permissions picker and the app or IDE control let you inspect or select the applicable permissions. Approve for me reviews eligible approval requests; it does not create a new filesystem grant.

Codex also has beta named permission profiles. They combine filesystem and command-network policy. Use default_permissions with [permissions], or use the older sandbox settings. They do not compose: a loaded sandbox_mode, including one selected by --sandbox, normally sends the session down the older configuration path. A managed allowed_permission_profiles requirement is the documented exception.

Here is an illustrative profile for a fictional project whose root .env, .env.local, and secrets/ directory must be excluded from sandboxed commands:

toml
default_permissions = "repo-edit"
approval_policy = "on-request"

[permissions.repo-edit.filesystem]
":minimal" = "read"

[permissions.repo-edit.filesystem.":workspace_roots"]
"." = "write"
".env" = "deny"
".env.local" = "deny"
"secrets" = "deny"

[permissions.repo-edit.network]
enabled = false

This shows configuration structure, not a verified policy for your installation. It allows workspace modification while carving out specific paths. It does not cover every differently named secret or nested environment file. More-specific profile entries override broader ones; at the same path, deny takes precedence over write, then read. Inspect the effective configuration and the platform's support before relying on it. Unsupported policies can be refused rather than silently enforced. Filesystem profile rules give the exact semantics.

If you use globs instead, check their actual coverage. An unbounded pattern such as **/*.env can require bounded pre-expansion on Linux, WSL, and native Windows. The configured depth and files created afterward matter; do not assume it catches .env.local or every future nested secret.

Command networking has another independent switch: network.enabled = true allows network access but does not start the filtering proxy. Domain restrictions require an active proxy. The profile's command-network rules do not govern model-service traffic, MCP, connected apps, browsers, or cloud execution. Scope and enforcement explains which traffic is covered.

Claude Code rules are not the command sandbox

Claude Code can read code, edit files, and run commands locally. Its ordinary permission rules evaluate deny, ask, and allow in that order, while the selected permission mode determines how eligible actions proceed. An allowedTools list preapproves operations; it is not a complete capability boundary.

For ordinary development, choose the working directory and a permission mode appropriate to the task, then review the actual diff and command results. Do not assume every Claude Code interface starts in the same mode or asks before every edit. Auto review, automatic edit acceptance, and bypass behavior differ, and none grants operating-system privileges or transfers files from another host.

A Read deny rule does not block every shell or MCP path to the same content. The optional Claude Code command sandbox covers Bash, PowerShell, Monitor, and their child processes. It is off by default, can fall back to unsandboxed execution unless configured to fail when unavailable, and does not surround file tools, MCP, hooks, or screen control. Native Windows does not support that command sandbox; WSL2 is a distinct supported environment.

Bypass is especially unsuitable as a file-discovery fix. It can permit protected-path writes, and unlisted network hosts can be approved unless a strict allowlist or managed restriction applies. Where the whole process needs confinement, use a suitably configured outer sandbox environment, container, or VM. A Git worktree only separates Git work.

Conceptual comparison of local Codex and Claude Code controls for reading, writing, commands, and network access

Remote control, SSH, and cloud tasks have different files

Remote control keeps the execution host important. In Codex, a phone or another desktop can control work using the connected host's files, tools, credentials, and permissions. An SSH project runs in the remote development environment. Neither arrangement turns every file on the viewing device into an input. Codex remote connections documents what comes from the host.

An explicit Codex chat handoff can transfer Git state to a worktree on a connected host with a matching saved repository project. It interrupts an active response before transfer. Check the destination and branch, then verify the resulting working directory and diff there. Handoff to Codex Cloud is not supported. This is a specific Git-state transfer, not automatic synchronization of every personal file, credential, or local service. Handoff instructions describe the prerequisites.

For Codex Cloud, choose Work in > Cloud and a published environment. A new task starts from that environment's prepared filesystem; an existing task continues with its own saved files, including its own uncommitted changes. Your unsent laptop changes are a different state. Check the repository version, dependencies, and task output before treating a cloud result as a fix to your local project.

Claude Code Remote Control and a Claude Code cloud session can both appear at claude.ai/code. Remote Control executes on your machine and needs the local session to remain available; a cloud session runs on cloud infrastructure. Use the execution location, not the browser address, to determine which files exist. Anthropic's comparison makes this distinction explicit.

Local execution also does not mean local-only data processing. Relevant excerpts, prompts, screenshots, or tool results may be sent to OpenAI services. Local computer access with Work Cloud does not provide strict zero data retention. Claude Remote Control relays activity through Anthropic over TLS and stores the session transcript, including tool activity, on its servers. Review the applicable Work data handling and Claude connection and security policies before supplying confidential material.

When a local file or project still cannot be opened

Separate “the content isn't here” from “this action isn't allowed.” These checks help locate the next useful step:

SymptomCheck firstUseful next evidence
A path pasted into chat cannot be readWhether this task has an upload, local executor, or authorized connectionAn attached file, confirmed host, or cited connected source
The agent reads an old versionUploaded copy, remote repository, saved environment, or unsaved editor bufferA distinctive line from the intended current file
“Could not use this project for a local chat”Client, selected execution host, project path, and effective workspace/device policyExact redacted error, OS, client version, and whether a new supported local task can open that path
A file is visible but editing failsWrite boundary, permission mode, OS rights, and managed requirementsThe rejected operation and destination path, without private contents
A local database is unavailableWhether the database belongs to this host and whether the required service/tool connection existsA scrubbed schema or small synthetic export; connection errors with credentials removed
A Windows path fails in WSL, or an SSH path fails locallyWhich filesystem owns that pathA path resolved in the execution environment, rather than a path copied from another host

The project-local-chat error does not identify one universal cause. Diagnose the host and path before changing permissions. If Work sync was recently enabled, its documented new-task requirement is relevant; it does not prove that sync explains every occurrence of the message.

A local database also needs more than visibility of a filename. It may require a running service, a client library, authentication, and permitted network access on the correct host. If you only need help with a query, a scrubbed schema and synthetic rows often supply enough input. Avoid putting production credentials or a complete customer database into a chat to establish connectivity.

For read restrictions, note the platform limit: administrators can enforce Codex deny_read requirements that users cannot weaken, and the runtime rejects full access when needed to preserve that boundary. On native Windows, managed deny_read covers direct file tools but not shell subprocess reads through that rule. Managed configuration documents the exception. Use harmless synthetic canary files to evaluate a proposed policy in an authorized test environment; never use real secrets as probes.

Use a small isolated copy before building a live bridge

When a task needs several local files but the original project contains unrelated sensitive state, create a separate task directory containing only the required inputs and supporting files. Add a short description of the source version, paths, expected output, and allowed changes. Use a clean dependency setup where practical, without copying real .env files, browser profiles, SSH keys, or production data.

Then open that directory with the chosen local tool, or deliberately transfer the approved package to the target environment. Ask it to identify the supplied version and inputs, perform the bounded task, and return a diff or separate output. Compare the result before applying it to the original project. This is an engineering workflow, not a claim that the copied directory itself provides security isolation.

If stronger isolation is required, define the outer container or VM's mounts, credentials, network destinations, and output channel explicitly. Writable bind mounts still affect the host. Mounted secrets and a Docker socket can give the process substantial authority. A permitted destination can receive data the process can read.

A custom MCP file server, tunnel, or watched-folder bridge is an optional infrastructure choice for repeated live access. Before using one, identify which server performs file operations, which account it uses, its allowed paths and actions, its authentication, and how to stop it. Ask for one harmless file from the permitted directory and inspect the server's actual activity before a larger task. Read-only access, a narrow root, logs, and a disconnect mechanism are useful design requirements; an “MCP” label does not prove they exist. For a single report or a normal local checkout, the supported upload or local-tool options above usually need less setup.

FAQ

Does putting my working directory in a ChatGPT message grant access?

No. The path identifies an intended file location. Access requires a tool running on that host, an uploaded copy, or an authorized source connection. In eligible Work tasks, approved local computer access supplies the local tool path; text alone does not.

Can Codex access a specific directory outside my project?

It can when the directory exists on the execution host and the effective permissions allow the required action. Additional workspace roots and filesystem profile rules can define that access. Read access and write access differ, and managed requirements can prevent a user from widening either. Check Codex filesystem permissions, not just the folder name in the prompt.

Does AGENTS.md control file access or workspace RBAC?

It provides instructions for the agent. It does not mount a directory, change operating-system privileges, or replace workspace roles and enforced permissions. Use it to state project conventions and authorized scope; use sandbox and approval controls and applicable administrative policy for technical restrictions.

Can a cloud task see my unpushed changes?

It can see changes already supplied to that cloud task, including its own saved uncommitted changes. It cannot infer unsent edits on your laptop. Work with approved local access can separately use an online connected computer; Codex Cloud has its own task filesystem. Check Work execution and Codex Cloud saved state for the arrangement you use.

Is local Codex or Claude Code fully private or offline?

Local tools can operate on local files, but relevant content can still be sent to the configured provider for inference. The command sandbox also does not govern every app, MCP server, screenshot, or separately stored copy. Review the Work data-handling boundaries and the applicable provider policy. Keep unnecessary sensitive material outside the task's reachable inputs.

Should I enable full access or bypass to fix a missing file?

First identify the execution host and confirm the content exists there. A broader permission cannot supply an absent file or reconnect an offline computer. If a necessary action is specifically blocked, review that action and the applicable boundary. Codex full access and Claude Code Bypass remove important checks; neither is a substitute for choosing the correct source.

Sources17

External pages this guide links to, in the order they appear. Last updated Oct 8, 2026.

  1. 1.ChatGPT agent overviewhelp.openai.com/en/articles/11752874-chatgpt-agent
  2. 2.Work documentationlearn.chatgpt.com/docs/enterprise/chatgpt-work-overview
  3. 3.file attachmenthelp.openai.com/en/articles/8555545-uploading-files-and-audio-to-chatgpt
  4. 4.Work local accesslearn.chatgpt.com/docs/enterprise/chatgpt-work-local-security
  5. 5.GitHub apphelp.openai.com/en/articles/11145903-connecting-github-to-chatgpt
  6. 6.Codex Cloudlearn.chatgpt.com/docs/environments/cloud-environments
  7. 7.Claude Codecode.claude.com/docs/en/overview
  8. 8.Libraryhelp.openai.com/en/articles/20001052-using-library-to-manage-files-in-chatgpt
  9. 9.Current sandbox documentationlearn.chatgpt.com/docs/sandboxing
  10. 10.named permission profileslearn.chatgpt.com/docs/permissions
  11. 11.permission rulescode.claude.com/docs/en/permissions
  12. 12.permission modecode.claude.com/docs/en/permission-modes
  13. 13.Claude Code command sandboxcode.claude.com/docs/en/sandboxing
  14. 14.sandbox environmentcode.claude.com/docs/en/sandbox-environments
  15. 15.Codex remote connectionslearn.chatgpt.com/docs/remote-connections
  16. 16.Anthropic's comparisoncode.claude.com/docs/en/remote-control
  17. 17.Managed configurationlearn.chatgpt.com/docs/enterprise/managed-configuration