feat(central-log-fragment): gather logs of all agents into a centralized location
Problem When running the agents framework or CLI, their logs are scattered (either printed chaotically to the console or stored in separate locations). Centralizing these logs will provide better control and be useful for future features like a shared knowledge base, extracting fact fragments, or even an animated pet :)
Proposed solution Perhaps we ask agents configure themselves to migrate their logs, or use symbolic links to point to a central repository.
A central log store makes sense for debugging multi-agent workflows, but symbolic links can break across filesystem boundaries (e.g., Docker volumes, tmpfs) and won't capture logs that agents emit before the link is established.
A more robust approach: implement a lightweight log shipper inside each agent's transport layer. In codexmate, agents communicate through the OpenAI-compatible bridge (src/bridge/). If each agent writes structured log lines (JSON, with agent_id, session_id, timestamp, level, message) to a named pipe or a Unix domain socket, a single collector process in the dashboard can aggregate them without touching filesystem symlinks.
You could also add a log_level config option per agent in the dashboard's session editor (src/config/), letting users filter noise. For the "shared knowledge base" use case, the collector could batch logs into a local SQLite store (already a dependency via the analytics module) with a schema like (id, agent_id, session_id, timestamp, level, payload).
If you want to avoid modifying agents, another option is to wrap the agent subprocess launch in src/agents/ with a tee-like pipe that duplicates stdout/stderr to both the console and a central file, then have the dashboard tail that file via a WebSocket.
Thanks for the suggestion. After reviewing it, this is a bit outside the current expected TODO scope for codexmate.
Centralized agent log collection could be useful later, but it would require careful design around privacy, retention, storage format, log volume, and UI/search behavior. For now, we are not planning to take this on.
Closing this issue for now.