Skip to content

Navigation Menu

Sign in
Sign up

[Bug]: gaia email --trace is a no-op on the daemon-relay query path #3345

Open
Labels
bugSomething isn't working triage

Description

Quick check:

  • I've searched existing issues and didn't find a duplicate.
  • This issue relates to Gaia Agent UI (gaia chat --ui).
  • This issue relates to a CLI command (gaia ...) or the SDK.

What happened?

gaia email --trace is advertised in --help (it's defined on the shared parent_parser and inherited by the email subcommand — src/gaia/cli.py:1224-1228, attached via parents=[parent_parser] at src/gaia/cli.py:1431), but it does nothing on the path a single query actually takes.

gaia email -q '...' no longer runs the agent in-process — it goes through handle_email_command (src/gaia/cli.py:4542), which calls gaia.daemon.agent_query.run_query(...) (src/gaia/cli.py:4616-4627). That function's signature has no trace parameter at all, and the JSON payload it builds for POST /v1/<agent>/query never includes a trace key:

# src/gaia/daemon/agent_query.py:254-300
def run_query(
 agent_id: str,
 query: str,
 *,
 context=None,
 model=None,
 max_steps=None,
 session_id=None,
 renderer=None,
 verbose: bool = False,
) -> QueryOutcome:
 ...
 payload: Dict[str, Any] = {
 "query": query,
 "run_id": run_id,
 "context": context or [],
 }
 if model:
 payload["model"] = model
 if max_steps is not None:
 payload["max_steps"] = max_steps
 if session_id:
 payload["session_id"] = session_id

args.trace is parsed (it's on parent_parser) but is simply never read anywhere on this call path, so running gaia email --trace -q '...' produces no trace file and no error — it silently behaves exactly like omitting the flag.

Steps to reproduce:

  1. Run gaia email --trace -q 'summarize my unread emails'.
  2. Observe the query completes normally.
  3. No trace JSON file is written anywhere, and nothing in stdout/stderr mentions tracing.

Two things make this harder to work around than it should be:

  • The sidecar's own log (hub/agents/email/python/gaia_agent_email/server.py:43-47) only logs at INFO (tool_call/tool_result lines), and the level is hard-coded: logging.basicConfig(level=logging.INFO, ...) with no environment variable read anywhere in that file to raise verbosity.
  • GET /v1/email/agent/session/{id}/history (hub/agents/email/python/gaia_agent_email/agent_routes.py:497-506) only returns user/assistant text pairs (HistoryTurn(user=u, assistant=a)), not a system prompt or per-call detail.

So there is currently no way to get GAIA's actual prompt/execution trace out of the email agent's normal query path, even though --trace looks like it should provide exactly that.

What did you expect to happen?

Either gaia email --trace writes a trace file (as advertised), or --help should not offer --trace for a subcommand where it's a no-op.

Acceptance criteria

  • gaia email --trace -q '...' writes a trace artifact, OR --trace is removed/disabled (with a clear message) for the email daemon-relay path.
  • If kept, document where the trace file lands.

Environment

Found while reading the CLI source (src/gaia/cli.py, src/gaia/daemon/agent_query.py) and the email sidecar (hub/agents/email/python/gaia_agent_email/) on main, while trying to capture a full execution trace for an unrelated evaluation of the email agent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /