Skip to content

Add --model flag so agents can self-report their model - #8

Merged
njb90 merged 2 commits into
mainfrom
agent-model-flag
Aug 6, 2026
Merged

Add --model flag so agents can self-report their model#8
njb90 merged 2 commits into
mainfrom
agent-model-flag

Conversation

@njb90

@njb90 njb90 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

agent_llm_model attribution was effectively always absent: agent frameworks don't export the active model to subshells, so env detection (ANTHROPIC_MODEL etc.) rarely finds anything. The model name lives only in the agent's own context — self-reporting is the only reliable channel.

  • New optional --model <name> flag, sent as agent_llm_model; overrides env detection, still suppressed by --no-agent-metadata.
  • --help closes with a note addressed to AI agents suggesting --goal and --model, with a copyable example — agents read help before running unfamiliar CLIs, so this is the conversion point.
  • Attribution stays best-effort and optional; nothing breaks for callers that omit it.

Test plan

  • Flag parsing (space/equals forms), --model override beats env detection, --no-agent-metadata still suppresses everything
  • Full suite 64/64

🤖 Generated with Claude Code

njb90 added 2 commits August 6, 2026 13:50
agent_llm_model was effectively always absent: no agent framework
exports its active model to subshells, so env detection rarely finds
one. Let callers self-report, and address AI agents directly in the
help text — the one place they reliably read.
@njb90
njb90 merged commit 411250c into main Aug 6, 2026
4 checks passed
@njb90 njb90 mentioned this pull request Aug 6, 2026
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.

1 participant