Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

working directory

basicwidespread

The working directory is the folder on the computer where a program or AI-agent is currently working and from which it searches for files by default.

In plain terms

Imagine working in a large office building and sitting at a desk in one room. If someone says, 'hand me the blue folder', you do not search the entire building, but look around the desk where you are sitting. The working directory is that desk: the folder the program is currently holding 'in its hand'.

This is necessary because a computer has a huge number of folders, and the program needs to know what to measure against. If you only tell it to 'open the jelentes.txt file,' it will look for it in the working directory. If the file is elsewhere, you must give the full path.

In the era of AI agents, the term has gained new significance. When you launch a coding agent in a folder, that becomes its workspace: it reads, writes, and runs commands there. By choosing the working directory, you also decide what the agent can access comfortably and what it cannot.

How it works

  1. Every running program keeps track of a 'current folder'; the operating system records this alongside the program.
  2. The program inherits this at startup: usually it receives the folder from which it was launched, for example, where you were standing in the command line. If launched from an icon, the system or the shortcut settings determine it.
  3. If the program searches for a file only by its name or a short, so-called relative path, the system finds it starting from the working directory.
  4. The working directory can be changed on the fly: in the command line, you switch to another folder with the cd command. Where you are standing is shown by the pwd command on Linux, macOS, and Windows PowerShell, and by the cd command issued alone in the traditional Windows command line.
  5. A coding agent takes the working directory as its starting point: it searches here for project files and instructions, and many tools only allow file modifications within this folder.

An everyday example

You ask a coding agent to reorganize your website's files, but you accidentally start it in the Documents folder instead of the website folder. The agent cannot find what it is looking for, or worse, it accesses completely different files. If you start it in the correct folder, it sees exactly what it needs to work with.

Who is affected

developerYou encounter it daily because commands, scripts, and coding agents all search for files relative to the working directory. → Code
employeeIf you use an AI agent to access files on your computer, the working directory determines which documents it can see and modify by default. → Work & HR
entrepreneur, executiveWhen deploying agents, one of the simplest security decisions is which folder you allow them to work in.

A common misconception

MythThe working directory is the folder where the program was installed.
In realityThe two are independent of each other: the program can reside in one location and operate entirely elsewhere. The working directory is typically the folder from which you launched it or to which it moved along the way.

Limits and risks

Similar, but not the same

Related concepts

Broader

file system, operating system

Narrower

projektmappa

On the edge

command line, terminal, file path, code repository, sandbox

A brief history

The concept emerged in the late 1960s with hierarchical, folder-organized file systems in the Multics system and spread with the Unix operating system in the 1970s. The cd command, which changes the working directory, is still found on almost every system. The pwd command, which prints the working directory, is usable on Unix-like systems and in PowerShell.

Where things stand

A fundamental concept in every operating system for decades. As of late 2026, coding agents mean non-developers also encounter it more and more often, because it determines the agent's workspace when the agent is launched.

Status: 2026 November

Also known as

working directory · munkamappa · current directory · current folder · working directory · current working directory · cwd · current directory

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.