Bug
`hive msg inbox ` fails in two ways:
1. Missing CODESHIP_AGENT_ID
Running `hive msg inbox hive-bX7r_2-tech-lead` throws:
Error: Codeship API not configured. Set CODESHIP_API_URL, CODESHIP_SESSION_ID, and CODESHIP_AGENT_ID environment variables.
The `msg` command calls `requireClientFromEnv()` which requires `CODESHIP_AGENT_ID`, but this env var is not set by the CLI harness for tech-lead sessions. Only `CODESHIP_API_URL` and `SESSION_ID` are provided.
2. messages.filter is not a function
Even after manually supplying `CODESHIP_AGENT_ID`, the command crashes:
TypeError: messages.filter is not a function
at Command.<anonymous> (file:///app/dist/cli/commands/msg.js:31:29)
This means the API response for messages is not an array (likely an object like `{ messages: [...] }` or some other shape), but the code does `messages.filter()` directly on the response.
Reproduction
# Fails with missing env var
hive msg inbox hive-bX7r_2-tech-lead
# Fails with filter error even with env var set
CODESHIP_AGENT_ID=<any-agent-id> hive msg inbox hive-bX7r_2-tech-lead
Fix
- The `msg` command should derive the agent ID from context or accept it as optional (not require it as an env var).
- The inbox handler should unwrap the API response correctly before calling `.filter()`.
Bug
`hive msg inbox ` fails in two ways:
1. Missing CODESHIP_AGENT_ID
Running `hive msg inbox hive-bX7r_2-tech-lead` throws:
The `msg` command calls `requireClientFromEnv()` which requires `CODESHIP_AGENT_ID`, but this env var is not set by the CLI harness for tech-lead sessions. Only `CODESHIP_API_URL` and `SESSION_ID` are provided.
2. messages.filter is not a function
Even after manually supplying `CODESHIP_AGENT_ID`, the command crashes:
This means the API response for messages is not an array (likely an object like `{ messages: [...] }` or some other shape), but the code does `messages.filter()` directly on the response.
Reproduction
Fix