Mô tả
Khi dùng goclaw credentials list --output json, CLI trả về null thay vì một JSON object/array rõ ràng.
Trong lúc debug timeout cho credentialed CLI (codex), agent cần list CLI credentials để tìm codex credential ID và update timeout_seconds bằng command:
goclaw credentials list --output json
Kết quả thực tế:
Điều này làm automation khó xử lý vì không rõ nghĩa là:
- Không có credentials?
- Không có quyền?
- Sai profile/server/token?
- API trả body rỗng?
- CLI parse lỗi?
Expected behavior
--output json nên trả về schema ổn định, ví dụ:
hoặc nếu không có credential thì ít nhất:
Nếu auth/profile/server sai hoặc không đủ quyền, CLI nên trả error rõ ràng với non-zero exit code, không trả null như success output.
Actual behavior
Command trả:
Không đủ thông tin để agent/human biết trạng thái thật.
Impact
- AI automation không thể phân biệt empty result với lỗi config/auth.
- Không thể tiếp tục flow update timeout cho credentialed CLI như
codex nếu không lấy được credential ID.
- Làm trải nghiệm debug bằng CLI bị mơ hồ.
Repro
goclaw credentials list --output json
Observed output:
Suggested fix
- Chuẩn hóa JSON output cho list command:
- success empty:
{ "items": [] } hoặc []
- success non-empty: cùng schema
- Nếu API response nil/empty bất thường, CLI nên emit error rõ ràng.
- Nếu profile/server/token chưa đúng, trả non-zero exit + message actionable.
- Bổ sung test cho
credentials list --output json khi API trả empty list.
Context
Use case đang cần:
goclaw credentials list --output json
# find codex credential id
goclaw credentials update <credID> --body '{"timeout_seconds":300}'
Ngoài ra, goclaw credentials update và goclaw credentials agent-grants update đã có command phù hợp để set timeout, nhưng list output null làm bước discovery bị kẹt.
Mô tả
Khi dùng
goclaw credentials list --output json, CLI trả vềnullthay vì một JSON object/array rõ ràng.Trong lúc debug timeout cho credentialed CLI (
codex), agent cần list CLI credentials để tìmcodexcredential ID và updatetimeout_secondsbằng command:Kết quả thực tế:
nullĐiều này làm automation khó xử lý vì không rõ nghĩa là:
Expected behavior
--output jsonnên trả về schema ổn định, ví dụ:{ "items": [] }hoặc nếu không có credential thì ít nhất:
Nếu auth/profile/server sai hoặc không đủ quyền, CLI nên trả error rõ ràng với non-zero exit code, không trả
nullnhư success output.Actual behavior
Command trả:
nullKhông đủ thông tin để agent/human biết trạng thái thật.
Impact
codexnếu không lấy được credential ID.Repro
Observed output:
nullSuggested fix
{ "items": [] }hoặc[]credentials list --output jsonkhi API trả empty list.Context
Use case đang cần:
Ngoài ra,
goclaw credentials updatevàgoclaw credentials agent-grants updateđã có command phù hợp để set timeout, nhưng list outputnulllàm bước discovery bị kẹt.