Skip to content

research: Claude Code CLI flags evaluation for autonomOS - #68

Merged
aterrylu merged 1 commit into
mainfrom
terry/cc-flags-research
Mar 26, 2026
Merged

research: Claude Code CLI flags evaluation for autonomOS#68
aterrylu merged 1 commit into
mainfrom
terry/cc-flags-research

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

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

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>
@aterrylu
aterrylu merged commit 94d8b61 into main Mar 26, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/cc-flags-research branch March 26, 2026 03:28
**Tool schema:**
```json
{
"message": "string (markdown)",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 routing

Add a ⚠️ Needs verification callout to this section so implementers know to validate the schema before coding against it.

@nox-0x nox-0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants