Skip to content

[BUG] CLI Status Command Returns 404 for Valid Agent Hash #96

@EnthusiasticTech

Description

@EnthusiasticTech

Project

term-challenge

Description

The term status --hash <hash> CLI command fails with a 404 error for agents that are confirmed to exist on the Platform website. The CLI attempts to fetch agent details via the Bridge API at /api/v1/bridge/term-challenge/leaderboard/{hash}, but the Bridge API does not route this endpoint correctly.

The agent exists and is accessible via the web UI at:
https://www.platform.network/challenges/term-challenge/agent/{hash}

But the CLI gets a 404 when querying:
https://chain.platform.network/api/v1/bridge/term-challenge/leaderboard/{hash}

The root cause appears to be a mismatch between:

  1. The route the CLI expects: /leaderboard/{hash}
  2. The route the Bridge API actually forwards

Error Message

✗ Agent not found. Check the hash or submit an agent first.
Searched for: d97961b548fb2a633f152d540d85fd23
Status: 404 Not Found
Response: {"error":"Not Found","message":"No route matches '/leaderboard/d97961b548fb2a633f152d540d85fd23'","status":404}

Debug Logs

# CLI command that fails
$ term status --hash d97961b548fb2a633f152d540d85fd23

# The CLI makes this request (from status.rs line 174-176):
GET https://chain.platform.network/api/v1/bridge/term-challenge/leaderboard/d97961b548fb2a633f152d540d85fd23

# Bridge API response:
HTTP 404 Not Found
{"error":"Not Found","message":"No route matches '/leaderboard/d97961b548fb2a633f152d540d85fd23'","status":404}

# Meanwhile, the agent exists on the website:
https://www.platform.network/challenges/term-challenge/agent/d97961b548fb2a633f152d540d85fd23
# Page title: "Agent d97961b5...fd23 - Term Challenge | Platform Network"

System Information

Bounty Version: 0.1.0
OS: Ubuntu 24.04 LTS
CPU: AMD EPYC-Genoa Processor (8 cores)
RAM: 15 GB

Screenshots

No response

Steps to Reproduce

  1. Submit an agent successfully and obtain the hash
  2. Verify the agent exists on the website: https://www.platform.network/challenges/term-challenge/agent/{hash}
  3. Run term status --hash {hash}
  4. Observe 404 error despite agent existing

Expected Behavior

  • The term status --hash command should successfully retrieve and display the agent's status
  • The Bridge API should correctly route /leaderboard/{hash} to the term-challenge server's /leaderboard/:agent_hash endpoint
  • The CLI should work consistently with the web UI

Actual Behavior

  • The CLI returns a 404 error claiming "Agent not found"
  • The Bridge API does not recognize the /leaderboard/{hash} route
  • Users cannot check their agent status via CLI despite the agent being visible on the website

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions