Skip to content

Tanmayy-B/agent-peek

Repository files navigation

Agent Peek

Give your active AI coding agent on-demand context from parallel Claude Code and Codex conversations.

Agent Peek is a pull-only bridge for people who think and work across several AI coding sessions at once. Trigger it in one session and that agent receives relevant context from the others in the same tmux window or Zellij tab. Peer sessions are never interrupted, synchronized, or messaged.

Why

Parallel agents often see only one slice of your work. Agent Peek helps the active agent understand decisions, constraints, competing perspectives, and the direction you are developing elsewhere.

Supported setups

Environment Support
Claude Code Yes, invoke /peak
Codex Yes, invoke $peak or choose it through /skills
tmux Yes, including optional prefix + P
Zellij Yes, through the agent skill or CLI
Mosh or SSH Yes, when Agent Peek and the agents run on the remote host
macOS Yes
Linux Yes
Windows Not currently supported

How it works

  1. A SessionStart hook maps each agent session to its pane and local JSONL transcript.
  2. The active agent invokes agent-peek context through its installed skill.
  3. Agent Peek finds registered peers in the current tmux window or Zellij tab.
  4. It extracts only user and assistant conversation text.
  5. It applies one global context budget across every peer.
  6. It prints the context for the active agent to interpret.

After the first peek, later peeks include only new conversation activity. Restarting either conversation automatically resets the relevant watermark.

Install

Requirements:

  • Python 3.10+
  • Claude Code, Codex, or both
  • tmux or Zellij

Quick install for Claude Code (one command)

If you use Claude Code, install Agent Peek as a plugin straight from this repo. It bundles the /peak skill and the SessionStart hook, and runs the pure standard-library CLI in place, so no separate Python install is needed:

/plugin marketplace add Tanmayy-B/agent-peek
/plugin install agent-peek@tanmayy-b

Restart your Claude Code sessions afterward so they register. This path sets up Claude Code only. To also bridge Codex sessions or add the tmux key binding, use the full install below.

Full install (Claude Code, Codex, and tmux)

Install directly from GitHub with uv:

uv tool install git+https://github.com/Tanmayy-B/agent-peek.git
agent-peek install
agent-peek doctor

Or use pipx:

pipx install git+https://github.com/Tanmayy-B/agent-peek.git
agent-peek install
agent-peek doctor

agent-peek install adds personal skills and SessionStart hooks for Claude and Codex. When tmux is installed, it also adds a marked block to ~/.tmux.conf. Existing JSON settings are merged and backed up.

Codex requires you to review new command hooks. Open /hooks, inspect the Agent Peek SessionStart hook, and trust it.

Restart your agent sessions after installation so they register.

Use

From Claude Code:

/peak

From Codex:

$peak

From tmux, press the tmux prefix and then Shift-p. With the default prefix, use Ctrl-b, release, then Shift-p.

Useful CLI commands:

agent-peek status
agent-peek doctor
agent-peek context --full
agent-peek peek --preview
agent-peek prune
agent-peek uninstall

--full intentionally rereads relevant context. --max-chars changes the global context budget for one invocation.

Upgrade the CLI and refresh its managed integrations with:

uv tool upgrade agent-peek
agent-peek install

For a pipx installation, replace the first command with pipx upgrade agent-peek.

Remote use

Mosh and SSH are transport layers. Install and run Agent Peek on the remote machine where Claude Code, Codex, the multiplexer, and their transcript files live.

Privacy

Peeking sends selected peer text to the model provider used by the active session. For example, peeking from Claude can send selected Codex conversation text to Anthropic. Nothing is sent until you explicitly invoke Peak or the tmux key binding.

Review docs/privacy.md before using Agent Peek with confidential conversations.

Design guarantees

  • Pull-only: peer panes are never changed.
  • On-demand: installed skills are configured for explicit invocation.
  • Local: no Agent Peek server, account, telemetry, or intermediary model.
  • Bounded: peers share one default 64,000-character context budget, divided among them; a small per-peer minimum and packet framing mean the total can run slightly higher in large workspaces.
  • Filtered: tool output, internal context blocks, and prior peek packets are excluded.
  • Reversible: uninstall removes only marked Agent Peek entries.

Development

python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e . ruff build
ruff check .
python -m unittest discover -s tests -v
python -m build

See CONTRIBUTING.md, docs/compatibility.md, and docs/architecture-overview.md.

Status

Agent Peek is alpha software. Claude Code and Codex own their transcript formats and may change them.

License

MIT

About

Give your active AI coding agent on-demand context from parallel Claude Code and Codex conversations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors