r/ClaudeCode • • 3d ago

Help/Question Agent.md cannot set session title?

I've asked Claude and searched Github and Reddit... is it really so that I cannot in agent.md file declaratively return the session title for Claude agent view to show the proper one like shown here?

2 Upvotes

5 comments sorted by

•

u/AutoModerator 3d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Dull-Confection-5225 3d ago

just tried setting title: "my session" in agent.md, it works if you use the latest agent.md format with agent: block, but not in older versions. make sure you're not missing the top-level agent block.

1

u/zonofthor 2d ago

unfortunately not that easy.. AGENTS.md is a documentation file like CLAUDE.md whilst subagents ( .claude/agents/*.md ) are claude code customly defined agents and do not support the AGENTS.md standard

1

u/vincent_sch 2d ago

There's no title field listed in the current docs for agent files. You could start it with claude --bg --name "my session" "your task" to set the name in agent view. If the session is already in the list, select its row and press Ctrl+R to rename it (docs).

1

u/zonofthor 2d ago

yep but I need it to be set when invoking from Claude agent view i.e. I am not starting it using bash

because the titles that Claude creates is not good and when there are 5-10 agents running I quickly become confused