If you want to see the files an agent edited right away, call orca file open <file path> from a Claude Code PostToolUse hook. This command does not change the screen you are looking at; it just opens that file as a tab in the Orca workspace, so there is no interruption while the agent works, and afterward the edited files are lined up as tabs. The trick is to launch the command detached in the background and not wait for the result, so the hook does not get slow.
This post is the second in a series that covers, one per day, the devices I built while turning my solo development environment around AI agents (AX, AI transformation). The first was how I let a hook name the session first.
Why was I hunting for edited files every time?
I keep Claude Code sessions open in a terminal app called Orca and hand work to them. The agent reads a file, edits it and moves on to the next, while the terminal leaves only a single line, “edited this file,” and scrolls past. To see what actually changed, I had to follow the path with my eyes, expand folders one by one in the explorer, and find and open the file. Even with just three or four edited files, I got confused about which ones I had seen and which I had not.
What did I want at first?
What I first wanted was the explorer. I thought it would be nice if, when a file was edited, its path expanded in the Orca explorer and the file was highlighted. So I started by reading the Orca CLI help. Under orca file there were three commands: open (open a file as a tab), diff (open a change comparison as a tab) and open-changed (open all files changed in git as tabs), and none that expands the explorer. “Reveal in explorer” existed only as a screen menu, so there was no way to call it from a hook.
Where did I get stuck?
I adjusted the goal a little. What I wanted was not the explorer itself but “the edited file right in front of me.” Showing a file’s state (newly created or modified) with colors was already done by Orca’s source control list. So the remaining job shrank to just opening the file, and orca file open fit that. This command opens the tab without moving the screen to it, and you add --focus only when you want to move.
Two obstacles remained. One is that this command finds the Orca workspace from the folder (cwd) where it is run. If you call it from a wrong folder, it cannot find where to open. The other is that if the hook gets slow, every edit by the agent is delayed by the same amount.
How did I change it with a hook?
A PostToolUse hook runs right after a tool call ends, and the tool name and arguments come in the input JSON. Only for editing tools does it take out the file path, and it launches the command with that file’s folder as cwd. Here is the real hook, shortened.
TOOLS = {"Edit", "Write", "MultiEdit", "NotebookEdit"}
def target(payload, env):
if env.get("CC_EDIT_REVEAL", "1") == "0" or env.get("CLAUDE_CODE_ENTRYPOINT", "").startswith("sdk"):
return None # skip for the off switch and unattended runs
if payload.get("tool_name") not in TOOLS:
return None
path = (payload.get("tool_input") or {}).get("file_path")
return path if path and os.path.isabs(path) and os.path.isfile(path) else None
subprocess.Popen([orca, "file", "open", path], cwd=os.path.dirname(path), start_new_session=True,
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
With start_new_session=True it launches as a process separate from the hook and throws away all output. The hook prints {} and ends right after calling Popen, so it does not hold the agent for as long as Orca takes to open the tab. In a folder where it cannot find where to open (a place that is not an Orca workspace), the command fails silently, and since the hook does not look at the result, nothing happens on the agent’s side.
For unattended runs (claude -p), where nobody watches the screen, it is skipped because there is no one to open the file for. When you want to turn it off briefly, the environment variable CC_EDIT_REVEAL=0 is all you need. Registration is one line under PostToolUse in the settings file. I appended || echo '{}' so that the hook prints empty JSON even if it fails, and set the time limit short at 5 seconds.
{
"hooks": {
"PostToolUse": [
{ "hooks": [{ "type": "command", "command": "python3 ~/.claude/hooks/edit_reveal.py 2>/dev/null || echo '{}'", "timeout": 5 }] }
]
}
}
How has my day changed?
When I hand work to the agent, look at another tab and come back, the edited files are already open as tabs. I no longer have to follow a path and expand folders, and reading the tabs from the left becomes the review order for this job. Because the tabs do not steal the screen, the screen I was looking at never changes suddenly while the agent is working.
This hook first went in on 2026-10-19 as 52 lines, and as of 2026-10-20 there are 3 commits that edited this file. The two decisions I made when I first built it, “tabs instead of the explorer” and “launch without waiting,” have not changed since.
Frequently asked questions
Does the screen jump to that tab every time a file is edited?
No. By default orca file open only opens and leaves the screen as it is, and to move the screen as well you have to add --focus separately. The hook does not add it.
Does the hook slow down the agent’s edits?
The hook launches the command as a separate process and ends right away without waiting for the result. The time it takes to open the tab has nothing to do with the agent’s next action.
Can I use it in a terminal other than Orca?
You can use the same structure. The part that takes the file path out in the hook is a Claude Code feature and is the same, and in the place of orca file open you put the “open file” command of the editor you use. However, you need to check for each editor whether it has an option to open without stealing the screen.