research: Claude Code CLI flags evaluation for autonomOS - #68
Conversation
Comprehensive analysis of ~40 CLI flags with recommendations: High priority: - --session-id: eliminates PTY regex parsing for session ID detection - --permission-mode auto: safer alternative to --dangerously-skip-permissions - --brief: enables SendUserMessage for structured agent-to-dashboard messaging - --append-system-prompt: inject orchestrator identity per-session Medium priority: - --agents/--agent: custom agent personas per session - --model/--effort: per-session model and effort control - --allowedTools/--disallowedTools: fine-grained tool permissions - --mcp-config: per-session MCP server injection Also documents missing hook events (SubagentStop, PostCompact) and proposes expanded SpawnOptions interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| **Tool schema:** | ||
| ```json | ||
| { | ||
| "message": "string (markdown)", |
There was a problem hiding this comment.
🟡 Warning
Problem: The SendUserMessage tool schema (specifically the status field values "normal" vs "proactive") is sourced from binary analysis of v2.1.81, not official documentation. If the actual field name or enum values differ, the hook relay routing logic will silently fail — proactive messages would never trigger notification badges.
Why it matters: This schema drives the implementation design in the Proposed SpawnOptions section and the hook integration. Getting it wrong means the entire briefMode feature ships broken.
Suggested fix:
// Before implementing: verify against live Claude Code output
// Run: claude --brief -p "say hi" --output-format stream-json 2>&1 | jq "select(.type==\"tool_use\" and .name==\"SendUserMessage\")"
// Confirm actual field names/values match before building the hook routingAdd a ⚠️ Needs verification callout to this section so implementers know to validate the schema before coding against it.
nox-0x
left a comment
There was a problem hiding this comment.
Thorough, well-structured research — the flag catalog is solid and the prioritization (session-id, permission-mode, brief) maps cleanly to real autonomOS pain points. One inline note on the SendUserMessage schema: it comes from binary analysis, so worth verifying the exact field names/enum values against live output before building the hook routing. Everything else is ready to implement.
Comprehensive analysis of ~40 CLI flags. Identifies three transformative integrations: --session-id (deterministic IDs), --permission-mode auto (safe autonomous), --brief (structured messaging). Full doc at docs/research/claude-code-flags/README.md