One plugin directory, installable by two ecosystems.
- Claude Code reads
.claude-plugin/plugin.jsonand the hooks beside it. - Any Agent Plugins 1.0 client reads the root
plugin.jsonand theskills/directory.
Session context capture. At the start of a session and at the end of every turn, the plugin records which repository, branch and worktree the session is working in, and posts it to LangWatch as a single log record. That is what lets a coding-agent session's traces be joined to the code it worked on.
It reports repository identity only: origin remote host, owner and name, the current branch, and the worktree name. It does not read, send or index your code. It posts nothing when the CLI is not signed in, nothing outside a git repository, and nothing when the context has not changed since the last post. It never writes to the session's output and never fails a session.
A skill. skills/langwatch teaches the agent to read traces back with the
langwatch CLI: search, fetch a trace, print a coding-agent transcript, list a
session's events.
The plugin carries no hook logic. Its hooks run scripts/launch.mjs, and the
launcher runs the installed langwatch CLI: langwatch ingest hook claude-code for the session context, langwatch ingest guidance claude-code
for the guidance the session reads at start. A fix to either command reaches
you with the next CLI release (npm install -g langwatch), with no plugin
update needed.
The launcher looks for the CLI in two places, in order:
- The node binary and entry script the CLI recorded about itself in
~/.langwatch/config.jsonthe last time you ranlangwatch login,langwatch claudeorlangwatch instrument. This is what still finds the CLI when Claude Code was started from a desktop app whose PATH has no version manager on it. A recorded path that no longer exists is skipped. langwatchon PATH.
With no CLI anywhere, the launcher exits zero and tells the session once that the CLI is not installed and how to install it.
Both CLI commands accept and ignore arguments they do not know and always exit zero, and the launcher exits zero whatever the CLI did, so any version of the plugin runs with any version of the CLI and a hook is never why a session broke.
In Claude Code:
claude plugin marketplace add langwatch/agent-plugin
claude plugin install langwatch@langwatchlangwatch claude sets this up for you, so you only need the commands above if
you are wiring it by hand.
In an Agent Plugins client, install this directory the way that client installs portable plugins. Portable installs get the skill; hooks are a Claude Code feature and are ignored elsewhere.
The hook posts to whichever control plane the CLI is signed in to, using the
ingest key stored in ~/.langwatch/config.json. Without one, it stays quiet.
npm install -g langwatch
langwatch loginAn OTEL_EXPORTER_OTLP_ENDPOINT (or the logs-specific variable) in the
environment takes precedence over the signed-in control plane, so an existing
collector keeps receiving the record.
claude plugin uninstall langwatch@langwatch
claude plugin marketplace remove langwatchThis repository is published from
langwatch/langwatch under
plugins/langwatch. Open issues and pull requests there.