Skip to content

Steer agents to the tracedecay CLI when MCP transport fails#177

Merged
ScriptedAlchemy merged 3 commits into
masterfrom
codex/cli-fallback-messaging
Jul 2, 2026
Merged

Steer agents to the tracedecay CLI when MCP transport fails#177
ScriptedAlchemy merged 3 commits into
masterfrom
codex/cli-fallback-messaging

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Add a using-the-cli skill to both plugin bundles (byte-identical for the Codex parity test) covering CLI discovery (tracedecay tool lists tools, tracedecay tool <name> --help shows parameters), invocation flags (--json, --args, --project, @file values), when to switch, and guardrails against querying .tracedecay/*.db directly or abandoning tracedecay on transport failure.
  • Register the skill in EMBEDDED_PLUGIN_FILES, CODEX_EMBEDDED_PLUGIN_FILES, and the CURSOR_PLUGIN_SKILLS session-steering index.
  • Mention the CLI fallback in the always-applied Cursor rule, the Codex session steering context, the MCP serverInstructions, both plugin READMEs, and both plugin manifest descriptions.
  • Attach a cli_fallback data field to the generic MCP tool-execution error response so a failing call itself points at the equivalent CLI command.

Motivation: past-session transcripts show agents falling back to raw SQLite queries against .tracedecay/.tokensave databases or dropping tracedecay entirely when the MCP server errors or times out, even though every MCP tool is also exposed as tracedecay tool <name> with built-in help discovery.

Test plan

  • cargo check --all-targets clean
  • cargo clippy --all-targets clean
  • cargo test --lib agents:: (135 passed — bundle coverage, Codex skill parity, skill-index sync)
  • cargo test --lib hooks:: (23 passed)
  • cargo test --test plugin_skill_contract_test --test hooks_test --test mcp_server_test --test mcp_handler_test — all pass except two pre-existing flaky mcp_handler_test cases (hermes_skill_bridge_mcp_tool_reads_host_owned_profile_state, message_search_reads_profile_sharded_session_db) that race on env vars under full parallelism and pass in isolation

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 03216eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/cli-fallback-messaging branch from 3bd5a10 to cbe216b Compare July 2, 2026 00:14
@ScriptedAlchemy ScriptedAlchemy merged commit 5c1210d into master Jul 2, 2026
18 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the codex/cli-fallback-messaging branch July 2, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant