Skip to content

README config example uses --mode json but code always forces --mode rpc #26

@tiagoefreitas

Description

@tiagoefreitas

Summary

The README configuration example shows --mode json in the tau command:

{
  "inbound": {
    "reply": {
      "mode": "command",
      "command": ["tau", "--mode", "json", "{{BodyStripped}}"],
      ...
    }
  }
}

However, the code in src/auto-reply/command-reply.ts always forces --mode rpc regardless of the config:

// Lines 485-490
const modeIdx = rpcArgv.indexOf("--mode");
if (modeIdx >= 0 && rpcArgv[modeIdx + 1]) {
  rpcArgv[modeIdx + 1] = "rpc";
} else {
  rpcArgv.push("--mode", "rpc");
}

And again in the rpcArgvForRun builder (lines 564-574):

const modeIdx = copy.indexOf("--mode");
if (modeIdx >= 0 && copy[modeIdx + 1]) {
  copy.splice(modeIdx, 2, "--mode", "rpc");
} else if (!copy.includes("--mode")) {
  copy.splice(copy.length - 1, 0, "--mode", "rpc");
}

Question

Is this intentional? If RPC mode is always required (for streaming, process reuse, etc.), should the README example be updated to either:

  1. Remove --mode json since it's ignored anyway, or
  2. Document that the --mode parameter in config is overridden and explain why RPC is used

Context

The RPC mode provides:

  • Process reuse via singleton pattern (tau stays alive between messages)
  • Streaming events via onEvent callback
  • Activity-based timeout reset
  • Clean agent_end signal for completion detection

So it makes sense to force RPC, but the config example is misleading as users might think --mode json is being respected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions