Skip to main content
skill CX Codex

router-session — Claude Code skill: what it does, how to install

router-session prints the session ID used by Weave Router telemetry and logs. Use it to locate one Codex run in the router dashboard.

Apache-2.0 ★ 5,622 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add weave-os/router --skill router-session -a claude-code
Open on GitHub

What router-session does

The skill runs scripts/emit.sh from its absolute skill path and prints the session ID on its own line. It takes no arguments. The returned value is formatted for copying and can serve as the lookup key in the Weave Router dashboard.

Weave Router sends this value as the Session-Id header on each request and keeps it for analytics joins. CODEX_SESSION_ID must be present in the environment; otherwise the script exits with an error. Do not replace it with the newest rollout transcript, since concurrent runs can have different IDs. Codex also shows the same value in its session banner.

What it helps with

  • locate one run in Weave Router telemetry
  • join router requests with analytics records
  • give support the exact session identifier
  • check the current Codex session ID

Example prompts for the agent

  • Invoke $router-session and print the current session ID on one line.
  • Run $router-session so I can copy the key into the Weave Router dashboard.
  • Execute $router-session and return the error as-is if the ID cannot be produced.

How to install router-session

1Skills CLI (Vercel)

npx skills add weave-os/router --skill router-session -a claude-code

2Manually: put the files in place

~/.claude/skills/router-session/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/router-session/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about router-session

How do I install router-session in Claude Code?

Run npx skills add weave-os/router --skill router-session -a claude-code, then check ~/.claude/skills/router-session/SKILL.md.

What does router-session do?

It runs the skill script and prints the current session ID as a single line. Weave Router uses that value in Session-Id and as a dashboard lookup key.

What does router-session need to work?

The environment must contain CODEX_SESSION_ID. When it is unset, the script exits with an error instead of guessing an ID from another rollout.

Source text

SKILL.md · Apache-2.0
---
name: router-session
description: "Print the session id that correlates this Codex session in Weave Router telemetry and logs."
---

<!-- weave-router managed router-session skill -->

When the user invokes `$router-session`, run this skill's `scripts/emit.sh` using the
absolute path shown in this skill's `<path>` (its directory + `/scripts/emit.sh`).
It takes no arguments.

The script prints the session id on its own line. Report that id back in one line,
formatted as inline code so the user can copy it. Do not send a user message and do
not type a Codex slash command.

The router carries this id as `Session-Id` on every request and stores it for
analytics joins, so it is also the lookup key in the router dashboard.

This skill needs `CODEX_SESSION_ID` in the environment. If it is unset the script
exits non-zero rather than reporting an id: the alternative is reading the newest
rollout transcript, which names a different session whenever two run at once, and
a wrong id sends someone else's session to support. Report the error as-is instead
of guessing.

Codex also prints the same id in its own session banner, which is the quickest
answer when this skill cannot produce one.

© weave-os · Apache-2.0 · weave-os/router

Similar skills

SKILL.md skills catalog →

From the same set20

The whole set →

Project sponsors

Companies that keep this analytics open