# AI use cases for Codex Trajectory (icesixgod/codex-trajectory)

Repo: [icesixgod/codex-trajectory](https://github.com/icesixgod/codex-trajectory) | Use cases: 4 | Page: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/

Codex Trajectory is a privacy-aware plugin that turns local Codex task logs into a searchable event ledger, an interactive timeline, and timing, token, and cost views.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Find where a Codex task spent its time: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/find-slow-steps-in-codex-task/
- Check token use and estimated cost of a Codex task: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/check-token-use-and-cost-of-codex-task/
- Locate failed and slow tool calls in past Codex runs: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/debug-failed-tool-calls-in-codex-history/
- Let an agent read a task's trajectory through MCP: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/agent-reads-codex-trajectory-via-mcp/

## How to find where a Codex task spent its time with Codex Trajectory

Repo: [icesixgod/codex-trajectory](https://github.com/icesixgod/codex-trajectory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Break one task's active time into tool, model/token, and unattributed shares to locate slow steps.

**Who it is for:** A developer whose Codex task took much longer than expected and who wants to know whether tools or model time caused the delay.

**The problem:** Codex task logs hold many events, and it is hard to tell which tool calls or waits consumed the time.

**The outcome:** A timing breakdown for the selected task showing local/tool execution, estimated model/token time, and unattributed time, with percentages, plus a timeline to locate slow calls.

### Steps

1. Run `codex plugin marketplace add icesixgod/codex-trajectory`
2. Run `codex plugin add codex-trajectory@icesixgod`
3. Open a new Codex task to load the plugin.
4. In the task's right panel, select + → More tools… → Plugins and MCPs → Codex Trajectory.
5. Find Current task timing distribution below the top statistics and click Calculate task timing.
6. Click Recalculate after the task changes to get a new snapshot.

### Prompt to paste into your agent

```text
Using the icesixgod/codex-trajectory repo, open the timing breakdown for the Codex task <task name or sessionId> with the show_codex_trajectory tool. Report the tool, model/token, and unattributed time shares with percentages. Verify that missing or invalid tool timing is listed separately from zero-duration events.
```

### Caveat

Model/token time is an estimate that includes network and queueing waits, not a measure of pure token generation.

Risk, credentials: The viewer reads local task logs that can contain sensitive content, so keep the safe summary view unless you need full details.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/find-slow-steps-in-codex-task/

## How to check token use and estimated cost of a Codex task with Codex Trajectory

Repo: [icesixgod/codex-trajectory](https://github.com/icesixgod/codex-trajectory) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Review task and turn token totals, cache usage, and estimated cost in one viewer.

**Who it is for:** A developer or team lead tracking how much a Codex task consumed before deciding whether to repeat a similar workflow.

**The problem:** Token counts and spend for a Codex task are spread across logs, so per-task totals are hard to see.

**The outcome:** Task and turn token totals, cache usage, and an estimated cost for the selected task, plus the latest available local quota sample.

### Steps

1. Run `codex plugin marketplace add icesixgod/codex-trajectory`
2. Run `codex plugin add codex-trajectory@icesixgod`
3. Open a new Codex task to load the plugin.
4. Open Codex Trajectory from the task's right panel or ask Codex to show the task trajectory.
5. Read the top statistics for task and turn totals, cache usage, and estimated cost.

### Prompt to paste into your agent

```text
Using the icesixgod/codex-trajectory repo, open the trajectory for the Codex task <sessionId> and report its token totals, cache usage, and estimated cost. Verify that the cost is labeled as an estimate based on bundled API prices, not a subscription bill.
```

### Caveat

Cost figures are estimates based on bundled API prices and do not match a Codex subscription bill, and local quota samples may lag the account service.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/check-token-use-and-cost-of-codex-task/

## How to locate failed and slow tool calls in past Codex runs with Codex Trajectory

Repo: [icesixgod/codex-trajectory](https://github.com/icesixgod/codex-trajectory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Search and filter earlier task history to find failing or slow tool calls and inspect them.

**Who it is for:** An engineer debugging a Codex run that stalled or failed and who needs the exact event where it went wrong.

**The problem:** A long task history mixes messages, tool calls, and compaction events, so the failing step is hard to find by reading the raw log.

**The outcome:** The matching event selected in the event ledger, with its duration and execution status visible in the inspector.

### Steps

1. Run `codex plugin marketplace add icesixgod/codex-trajectory`
2. Run `codex plugin add codex-trajectory@icesixgod`
3. Open Codex Trajectory from the task's right panel.
4. Click Load earlier records to browse history, including compressed and paginated logs.
5. Use search and event filters to find the record, then select it to inspect it.

### Prompt to paste into your agent

```text
Using the icesixgod/codex-trajectory repo, search the history of the Codex task <sessionId> for failed or slow tool calls and list the matching events with their durations and status. Verify that each listed event has a status and that zero and sub-millisecond durations are not reported as failures.
```

### Caveat

Steps are approximate, and reasoning summaries appear only when they were saved in the log.

Risk, credentials: Choosing Load full details exposes bounded tool inputs and outputs to the active conversation, so confirm before sharing them.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/debug-failed-tool-calls-in-codex-history/

## How to let an agent read a task's trajectory through MCP with Codex Trajectory

Repo: [icesixgod/codex-trajectory](https://github.com/icesixgod/codex-trajectory) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Have Codex call the trajectory tools to pull a safe structured summary of a specific task.

**Who it is for:** A developer who wants Codex to review its own earlier task, or another task, without opening the viewer by hand.

**The problem:** Reviewing a prior task by hand takes time, and an agent cannot read the structured trajectory without a tool.

**The outcome:** A safe trajectory summary for the named task, returned through the MCP tools, that the agent can use to answer questions about what happened.

### Steps

1. Run `codex plugin marketplace add icesixgod/codex-trajectory`
2. Run `codex plugin add codex-trajectory@icesixgod`
3. Open a new Codex task to load the plugin.
4. Ask Codex: Show the safe trajectory summary for this Codex task.
5. Pass an explicit sessionId to get_codex_trajectory to read a specific task.

### Prompt to paste into your agent

```text
Using the icesixgod/codex-trajectory repo, call get_codex_trajectory with the sessionId <sessionId> and return a safe summary of that task's steps and timing. Verify that the reply has no tool inputs, outputs, or raw metadata, since those stay hidden in the safe summary.
```

### Caveat

Without an explicit sessionId, the read and show tools pick the most recently modified active task, which may not be the current task.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/icesixgod-codex-trajectory/agent-reads-codex-trajectory-via-mcp/
