Repository navigation
Trajectory 0.6.5-beta
Pre-releaseTrajectory 0.6.5-beta
This beta release introduces an opt-in background module scheduler, adds additive per-turn duration and prompt-word metrics, expands agent configuration and plugin inventory reporting, extends AI Gateway model filtering to Codex, and improves capture reliability, metric accuracy, and Safari support in Trajectory Lens.
Highlights
Background module scheduler
trajectory scheduler runs periodic background work for enabled modules while you are signed in (off by default behind module_scheduler). Use trajectory scheduler install to register the OS launcher on macOS, Windows, or Linux, or enable and register it during setup with trajectory setup --scheduler (and install.sh --scheduler). The scheduler restarts on the new version after Trajectory updates itself, and scheduled checks for running and installed AI tools now deliver their metrics to your Datadog destinations when both process_inventory and module_scheduler are enabled.
trajectory setup --scheduler
trajectory scheduler statusAdditive per-turn duration and prompt-word metrics
Trajectory now exports trajectory.turn.typed_words.additive, trajectory.turn.duration_ms.additive, and trajectory.turn.subagent_duration_ms.additive to measure human-typed prompt words, parent-turn execution time, and confirmed subagent execution time. Local turn records and opt-in Reader V2 turn queries expose typed_words and subagent_duration_ms as well.
Expanded agent configuration and plugin inventory
trajectory agent-inventory-metrics --emit-metrics (and the opt-in process_inventory installed-tools check) now reports configured MCP servers for Claude Code, Cursor, Kiro, and Codex—including name, scope, enabled state, and remote host—along with the configured default model for Claude Code and Codex. Agent Security and trajectory doctor also match GitHub Copilot CLI plugin and skill discovery, including manifest, root, and linked skills, while ignoring invalid Copilot settings.json entries.
trajectory agent-inventory-metrics --emit-metricsAI Gateway model filtering for Claude Code and Codex
Pass --provider-slugs <slug>,<slug> to trajectory claude or trajectory codex to limit the /model picker to models from those AI Gateway accounts and Gateway routers. An organization's managed provider_slugs setting takes precedence over the flag, and the first Codex launch sets the shared Codex model list.
trajectory codex --provider-slugs <slug>,<slug>Improvements
trajectory config synchonorsorg.sync_interval(default3600s) and skips remote fetches while local organization config is still fresh, unless--forceis passed.- Codex capture tracks twice as many recent sessions before reaching its capacity limit.
- Turn token and cost metrics keep their first published value when a late correction arrives after send instead of sending a reversal and replacement pair; corrections known before first send still publish once, and post-send differences are recorded locally under
changed_after_send. - Session activity reports the turn number that produced it for Claude Code, Codex, Cursor, Pi, and OpenCode sessions.
Fixes
- Process detection on macOS now recognizes running Windsurf instances, including current releases packaged as Devin.app.
- Trajectory Lens now opens in Safari instead of failing on pages that relied on an unavailable idle-callback API.
trajectory setupandtrajectory plugins security setupsucceed on Claude Code 2.1.331 and later when installing a plugin that clears an earlier decline entry.- Claude Code turns interrupted during stop processing now close on the next prompt or session end, and sessions that record native tool timing after closing are recognized as ended by recovery, rebuild, and doctor checks.
- Retried hook deliveries no longer duplicate captured session events after an interrupted server or fallback write, and completed turns accepted while the local database is briefly locked settle to idle once it is available.
- Session activity no longer flips back to working when a tool result arrives after a turn has already completed or failed.
- Restarted Pi sessions reopen so session messaging can resume, and automatically retried Pi errors no longer report the turn as failed while the retry runs.
- Published session duration metrics and the
trajectory viewand Lens session lists now match client-reported and stored session durations; recovered session ends are dated at the last recorded event; and zero-turn sessions no longer emittrajectory.session.completed,trajectory.session.duration_ms, ortrajectory.session.last_seen.unix. - Live count metrics handled late are stamped at handling time when sent to Datadog, while backfilled and replayed sessions keep their recorded timestamps.
- Clean shutdown closes and checkpoints local cache and metric outbox databases so the next start reads less data.
Privacy and safety
- The background service no longer reads
DD_SITE; it usesexport.sitewith any organization-managed site taking precedence, so a managed API key is never sent to another Datadog site. - Agent Security now inspects complex shell commands—including
cdwith relative paths, split verbs, variables, and nested shells—that modify hook, settings, or.mcp.jsonfiles for Claude Code, Codex, Cursor, Gemini, Copilot, Windsurf, and.agents, leaving the command seen by other rules unchanged.